Documentation ¶
Overview ¶
Package versions contains auto-generated files. DO NOT MODIFY
Package versions contains auto-generated files. DO NOT MODIFY
Package versions contains auto-generated files. DO NOT MODIFY
Index ¶
- type Client
- func (c Client) Create(input *CreateVersionInput) (*CreateVersionResponse, error)
- func (c Client) CreateWithContext(context context.Context, input *CreateVersionInput) (*CreateVersionResponse, error)
- func (c *Client) NewVersionsPaginator() *VersionsPaginator
- func (c *Client) NewVersionsPaginatorWithOptions(options *VersionsPageOptions) *VersionsPaginator
- func (c Client) Page(options *VersionsPageOptions) (*VersionsPageResponse, error)
- func (c Client) PageWithContext(context context.Context, options *VersionsPageOptions) (*VersionsPageResponse, error)
- type ClientProperties
- type CreateContentDetails
- type CreateVersionInput
- type CreateVersionResponse
- type PageAssetVersionResponse
- type PageMetaResponse
- type VersionsPage
- type VersionsPageOptions
- type VersionsPageResponse
- type VersionsPaginator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client for managing asset version resources See https://www.twilio.com/docs/runtime/functions-assets-api/api/asset for more details
func New ¶
func New(client *client.Client, properties ClientProperties) *Client
New creates a new instance of the versions client
func (Client) Create ¶
func (c Client) Create(input *CreateVersionInput) (*CreateVersionResponse, error)
Create creates a new asset version See https://www.twilio.com/docs/runtime/functions-assets-api/api/asset#create-an-asset-resource for more details Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information
func (Client) CreateWithContext ¶
func (c Client) CreateWithContext(context context.Context, input *CreateVersionInput) (*CreateVersionResponse, error)
CreateWithContext creates a new asset version See https://www.twilio.com/docs/runtime/functions-assets-api/api/asset#create-an-asset-resource for more details
func (*Client) NewVersionsPaginator ¶
func (c *Client) NewVersionsPaginator() *VersionsPaginator
NewVersionsPaginator creates a new instance of the paginator for Page.
func (*Client) NewVersionsPaginatorWithOptions ¶
func (c *Client) NewVersionsPaginatorWithOptions(options *VersionsPageOptions) *VersionsPaginator
NewVersionsPaginatorWithOptions creates a new instance of the paginator for Page with options.
func (Client) Page ¶
func (c Client) Page(options *VersionsPageOptions) (*VersionsPageResponse, error)
Page retrieves a page of asset versions See https://www.twilio.com/docs/runtime/functions-assets-api/api/asset-version#read-multiple-assetversion-resources for more details Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information
func (Client) PageWithContext ¶
func (c Client) PageWithContext(context context.Context, options *VersionsPageOptions) (*VersionsPageResponse, error)
PageWithContext retrieves a page of asset versions See https://www.twilio.com/docs/runtime/functions-assets-api/api/asset-version#read-multiple-assetversion-resources for more details
type ClientProperties ¶
ClientProperties are the properties required to manage the versions resources
type CreateContentDetails ¶
type CreateContentDetails struct { Body io.ReadSeeker `validate:"required" mapstructure:"Body"` ContentType string `validate:"required" mapstructure:"ContentType"` FileName string `validate:"required" mapstructure:"FileName"` }
type CreateVersionInput ¶
type CreateVersionInput struct { Content CreateContentDetails `validate:"required" mapstructure:"Content"` Path string `validate:"required" mapstructure:"Path"` Visibility string `validate:"required" mapstructure:"Visibility"` }
CreateVersionInput defines the input fields for creating a new asset version resource
type CreateVersionResponse ¶
type CreateVersionResponse struct { AccountSid string `json:"account_sid"` AssetSid string `json:"asset_sid"` DateCreated time.Time `json:"date_created"` Path string `json:"path"` ServiceSid string `json:"service_sid"` Sid string `json:"sid"` URL string `json:"url"` Visibility string `json:"visibility"` }
CreateVersionResponse defines the response fields for the created asset version
type PageAssetVersionResponse ¶
type PageAssetVersionResponse struct { AccountSid string `json:"account_sid"` AssetSid string `json:"asset_sid"` DateCreated time.Time `json:"date_created"` Path string `json:"path"` ServiceSid string `json:"service_sid"` Sid string `json:"sid"` URL string `json:"url"` Visibility string `json:"visibility"` }
type PageMetaResponse ¶
type VersionsPage ¶
type VersionsPage struct { CurrentPage *VersionsPageResponse Error error // contains filtered or unexported fields }
VersionsPage defines the fields for the page The CurrentPage and Error fields can be used to access the PageAssetVersionResponse or error that is returned from the api call(s)
type VersionsPageOptions ¶
VersionsPageOptions defines the query options for the api operation
type VersionsPageResponse ¶
type VersionsPageResponse struct { Meta PageMetaResponse `json:"meta"` Versions []PageAssetVersionResponse `json:"asset_versions"` }
VersionsPageResponse defines the response fields for the asset versions page
type VersionsPaginator ¶
type VersionsPaginator struct { Page *VersionsPage Versions []PageAssetVersionResponse // contains filtered or unexported fields }
VersionsPaginator defines the fields for makings paginated api calls Versions is an array of versions that have been returned from all of the page calls
func (*VersionsPaginator) CurrentPage ¶
func (p *VersionsPaginator) CurrentPage() *VersionsPageResponse
CurrentPage retrieves the results for the current page
func (*VersionsPaginator) Error ¶
func (p *VersionsPaginator) Error() error
Error retrieves the error returned from the page
func (*VersionsPaginator) Next ¶
func (p *VersionsPaginator) Next() bool
Next retrieves the next page of results. Next will return false when either an error occurs or there are no more pages to iterate Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information
func (*VersionsPaginator) NextWithContext ¶
func (p *VersionsPaginator) NextWithContext(context context.Context) bool
NextWithContext retrieves the next page of results. NextWithContext will return false when either an error occurs or there are no more pages to iterate