Documentation ¶
Overview ¶
Package workers contains auto-generated files. DO NOT MODIFY
Package workers contains auto-generated files. DO NOT MODIFY
Package workers contains auto-generated files. DO NOT MODIFY
Index ¶
- type Client
- func (c Client) Create(input *CreateWorkerInput) (*CreateWorkerResponse, error)
- func (c Client) CreateWithContext(context context.Context, input *CreateWorkerInput) (*CreateWorkerResponse, error)
- func (c *Client) NewWorkersPaginator() *WorkersPaginator
- func (c *Client) NewWorkersPaginatorWithOptions(options *WorkersPageOptions) *WorkersPaginator
- func (c Client) Page(options *WorkersPageOptions) (*WorkersPageResponse, error)
- func (c Client) PageWithContext(context context.Context, options *WorkersPageOptions) (*WorkersPageResponse, error)
- type ClientProperties
- type CreateWorkerInput
- type CreateWorkerResponse
- type PageMetaResponse
- type PageWorkerResponse
- type WorkersPage
- type WorkersPageOptions
- type WorkersPageResponse
- type WorkersPaginator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { CumulativeStatistics func() *cumulative_statistics.Client RealTimeStatistics func() *real_time_statistics.Client Statistics func() *statistics.Client // contains filtered or unexported fields }
Client for managing worker resources See https://www.twilio.com/docs/taskrouter/api/worker for more details
func New ¶
func New(client *client.Client, properties ClientProperties) *Client
New creates a new instance of the workers client
func (Client) Create ¶
func (c Client) Create(input *CreateWorkerInput) (*CreateWorkerResponse, error)
Create creates a new worker See https://www.twilio.com/docs/taskrouter/api/worker#create-a-worker-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 *CreateWorkerInput) (*CreateWorkerResponse, error)
CreateWithContext creates a new worker See https://www.twilio.com/docs/taskrouter/api/worker#create-a-worker-resource for more details
func (*Client) NewWorkersPaginator ¶
func (c *Client) NewWorkersPaginator() *WorkersPaginator
NewWorkersPaginator creates a new instance of the paginator for Page.
func (*Client) NewWorkersPaginatorWithOptions ¶
func (c *Client) NewWorkersPaginatorWithOptions(options *WorkersPageOptions) *WorkersPaginator
NewWorkersPaginatorWithOptions creates a new instance of the paginator for Page with options.
func (Client) Page ¶
func (c Client) Page(options *WorkersPageOptions) (*WorkersPageResponse, error)
Page retrieves a page of workers See https://www.twilio.com/docs/taskrouter/api/worker#read-multiple-worker-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 *WorkersPageOptions) (*WorkersPageResponse, error)
PageWithContext retrieves a page of workers See https://www.twilio.com/docs/taskrouter/api/worker#read-multiple-worker-resources for more details
type ClientProperties ¶
type ClientProperties struct {
WorkspaceSid string
}
ClientProperties are the properties required to manage the workers resources
type CreateWorkerInput ¶
type CreateWorkerInput struct { ActivitySid *string `form:"ActivitySid,omitempty"` Attributes *string `form:"Attributes,omitempty"` FriendlyName string `validate:"required" form:"FriendlyName"` }
CreateWorkerInput defines the input fields for creating a new worker resource
type CreateWorkerResponse ¶
type CreateWorkerResponse struct { AccountSid string `json:"account_sid"` ActivityName string `json:"activity_name"` ActivitySid string `json:"activity_sid"` Attributes string `json:"attributes"` Available bool `json:"available"` DateCreated time.Time `json:"date_created"` DateStatusChanged *time.Time `json:"date_status_changed,omitempty"` DateUpdated *time.Time `json:"date_updated,omitempty"` FriendlyName string `json:"friendly_name"` Sid string `json:"sid"` URL string `json:"url"` WorkspaceSid string `json:"workspace_sid"` }
CreateWorkerResponse defines the response fields for the created worker
type PageMetaResponse ¶
type PageWorkerResponse ¶
type PageWorkerResponse struct { AccountSid string `json:"account_sid"` ActivityName string `json:"activity_name"` ActivitySid string `json:"activity_sid"` Attributes string `json:"attributes"` Available bool `json:"available"` DateCreated time.Time `json:"date_created"` DateStatusChanged *time.Time `json:"date_status_changed,omitempty"` DateUpdated *time.Time `json:"date_updated,omitempty"` FriendlyName string `json:"friendly_name"` Sid string `json:"sid"` URL string `json:"url"` WorkspaceSid string `json:"workspace_sid"` }
type WorkersPage ¶
type WorkersPage struct { CurrentPage *WorkersPageResponse Error error // contains filtered or unexported fields }
WorkersPage defines the fields for the page The CurrentPage and Error fields can be used to access the PageWorkerResponse or error that is returned from the api call(s)
type WorkersPageOptions ¶
type WorkersPageOptions struct { PageSize *int Page *int PageToken *string ActivityName *string ActivitySid *string Available *bool FriendlyName *string TargetWorkersExpression *string TaskQueueName *string TaskQueueSid *string }
WorkersPageOptions defines the query options for the api operation
type WorkersPageResponse ¶
type WorkersPageResponse struct { Meta PageMetaResponse `json:"meta"` Workers []PageWorkerResponse `json:"workers"` }
WorkersPageResponse defines the response fields for the workers page
type WorkersPaginator ¶
type WorkersPaginator struct { Page *WorkersPage Workers []PageWorkerResponse // contains filtered or unexported fields }
WorkersPaginator defines the fields for makings paginated api calls Workers is an array of workers that have been returned from all of the page calls
func (*WorkersPaginator) CurrentPage ¶
func (p *WorkersPaginator) CurrentPage() *WorkersPageResponse
CurrentPage retrieves the results for the current page
func (*WorkersPaginator) Error ¶
func (p *WorkersPaginator) Error() error
Error retrieves the error returned from the page
func (*WorkersPaginator) Next ¶
func (p *WorkersPaginator) 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 (*WorkersPaginator) NextWithContext ¶
func (p *WorkersPaginator) 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
Directories ¶
Path | Synopsis |
---|---|
Package cumulative_statistics contains auto-generated files.
|
Package cumulative_statistics contains auto-generated files. |
Package real_time_statistics contains auto-generated files.
|
Package real_time_statistics contains auto-generated files. |
Package statistics contains auto-generated files.
|
Package statistics contains auto-generated files. |