assets

package
v0.14.1 Latest Latest
Warning

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

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

Documentation

Overview

Package assets contains auto-generated files. DO NOT MODIFY

Package assets contains auto-generated files. DO NOT MODIFY

Package assets 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 AssetsPage

type AssetsPage struct {
	CurrentPage *AssetsPageResponse
	Error       error
	// contains filtered or unexported fields
}

AssetsPage defines the fields for the page The CurrentPage and Error fields can be used to access the PageAssetResponse or error that is returned from the api call(s)

type AssetsPageOptions

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

AssetsPageOptions defines the query options for the api operation

type AssetsPageResponse

type AssetsPageResponse struct {
	Assets []PageAssetResponse `json:"assets"`
	Meta   PageMetaResponse    `json:"meta"`
}

AssetsPageResponse defines the response fields for the assets page

type AssetsPaginator

type AssetsPaginator struct {
	Page   *AssetsPage
	Assets []PageAssetResponse
	// contains filtered or unexported fields
}

AssetsPaginator defines the fields for makings paginated api calls Assets is an array of assets that have been returned from all of the page calls

func (*AssetsPaginator) CurrentPage

func (p *AssetsPaginator) CurrentPage() *AssetsPageResponse

CurrentPage retrieves the results for the current page

func (*AssetsPaginator) Error

func (p *AssetsPaginator) Error() error

Error retrieves the error returned from the page

func (*AssetsPaginator) Next

func (p *AssetsPaginator) 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 (*AssetsPaginator) NextWithContext

func (p *AssetsPaginator) 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

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client for managing asset 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 assets client

func (Client) Create

func (c Client) Create(input *CreateAssetInput) (*CreateAssetResponse, error)

Create creates a new asset 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 *CreateAssetInput) (*CreateAssetResponse, error)

CreateWithContext creates a new asset See https://www.twilio.com/docs/runtime/functions-assets-api/api/asset#create-an-asset-resource for more details

func (*Client) NewAssetsPaginator

func (c *Client) NewAssetsPaginator() *AssetsPaginator

NewAssetsPaginator creates a new instance of the paginator for Page.

func (*Client) NewAssetsPaginatorWithOptions

func (c *Client) NewAssetsPaginatorWithOptions(options *AssetsPageOptions) *AssetsPaginator

NewAssetsPaginatorWithOptions creates a new instance of the paginator for Page with options.

func (Client) Page

func (c Client) Page(options *AssetsPageOptions) (*AssetsPageResponse, error)

Page retrieves a page of assets See https://www.twilio.com/docs/runtime/functions-assets-api/api/asset#read-multiple-asset-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 *AssetsPageOptions) (*AssetsPageResponse, error)

PageWithContext retrieves a page of assets See https://www.twilio.com/docs/runtime/functions-assets-api/api/asset#read-multiple-asset-resources for more details

type ClientProperties

type ClientProperties struct {
	ServiceSid string
}

ClientProperties are the properties required to manage the assets resources

type CreateAssetInput

type CreateAssetInput struct {
	FriendlyName string `validate:"required" form:"FriendlyName"`
}

CreateAssetInput defines the input fields for creating a new asset resource

type CreateAssetResponse

type CreateAssetResponse struct {
	AccountSid   string     `json:"account_sid"`
	DateCreated  time.Time  `json:"date_created"`
	DateUpdated  *time.Time `json:"date_updated,omitempty"`
	FriendlyName string     `json:"friendly_name"`
	ServiceSid   string     `json:"service_sid"`
	Sid          string     `json:"sid"`
	URL          string     `json:"url"`
}

CreateAssetResponse defines the response fields for the created asset

type PageAssetResponse

type PageAssetResponse struct {
	AccountSid   string     `json:"account_sid"`
	DateCreated  time.Time  `json:"date_created"`
	DateUpdated  *time.Time `json:"date_updated,omitempty"`
	FriendlyName string     `json:"friendly_name"`
	ServiceSid   string     `json:"service_sid"`
	Sid          string     `json:"sid"`
	URL          string     `json:"url"`
}

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"`
}

Jump to

Keyboard shortcuts

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