versions

package
v0.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2021 License: Apache-2.0 Imports: 8 Imported by: 2

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

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

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

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

type ClientProperties struct {
	AssetSid   string
	ServiceSid string
}

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 PageMetaResponse struct {
	FirstPageURL    string  `json:"first_page_url"`
	Key             string  `json:"key"`
	NextPageURL     *string `json:"next_page_url,omitempty"`
	Page            int     `json:"page"`
	PageSize        int     `json:"page_size"`
	PreviousPageURL *string `json:"previous_page_url,omitempty"`
	URL             string  `json:"url"`
}

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

type VersionsPageOptions struct {
	PageSize  *int
	Page      *int
	PageToken *string
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL