Documentation
¶
Overview ¶
Package channel contains auto-generated files. DO NOT MODIFY
Package channel contains auto-generated files. DO NOT MODIFY
Package channel contains auto-generated files. DO NOT MODIFY
Index ¶
- type Client
- func (c Client) Fetch() (*FetchChannelResponse, error)
- func (c Client) FetchWithContext(context context.Context) (*FetchChannelResponse, error)
- func (c Client) Update(input *UpdateChannelInput) (*UpdateChannelResponse, error)
- func (c Client) UpdateWithContext(context context.Context, input *UpdateChannelInput) (*UpdateChannelResponse, error)
- type ClientProperties
- type FetchChannelResponse
- type UpdateChannelInput
- type UpdateChannelResponse
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 a specific worker channel resource See https://www.twilio.com/docs/taskrouter/api/worker-channel for more details
func New ¶
func New(client *client.Client, properties ClientProperties) *Client
New creates a new instance of the channel client
func (Client) Fetch ¶
func (c Client) Fetch() (*FetchChannelResponse, error)
Fetch retrieves an worker channel resource See https://www.twilio.com/docs/taskrouter/api/worker-channel#fetch-a-workerchannel-resource for more details Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information
func (Client) FetchWithContext ¶
func (c Client) FetchWithContext(context context.Context) (*FetchChannelResponse, error)
FetchWithContext retrieves an worker channel resource See https://www.twilio.com/docs/taskrouter/api/worker-channel#fetch-a-workerchannel-resource for more details
func (Client) Update ¶
func (c Client) Update(input *UpdateChannelInput) (*UpdateChannelResponse, error)
Update modifies a worker channel resource See https://www.twilio.com/docs/taskrouter/api/worker-channel#update-a-workerchannel-resource for more details Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information
func (Client) UpdateWithContext ¶
func (c Client) UpdateWithContext(context context.Context, input *UpdateChannelInput) (*UpdateChannelResponse, error)
UpdateWithContext modifies a worker channel resource See https://www.twilio.com/docs/taskrouter/api/worker-channel#update-a-workerchannel-resource for more details
type ClientProperties ¶
ClientProperties are the properties required to manage the channel resources
type FetchChannelResponse ¶
type FetchChannelResponse struct { AccountSid string `json:"account_sid"` AssignedTasks int `json:"assigned_tasks"` Available bool `json:"available"` AvailableCapacityPercentage int `json:"available_capacity_percentage"` ConfiguredCapacity int `json:"configured_capacity"` DateCreated time.Time `json:"date_created"` DateUpdated *time.Time `json:"date_updated,omitempty"` Sid string `json:"sid"` TaskChannelSid string `json:"task_channel_sid"` TaskChannelUniqueName string `json:"task_channel_unique_name"` URL string `json:"url"` WorkerSid string `json:"worker_sid"` WorkspaceSid string `json:"workspace_sid"` }
FetchChannelResponse defines the response fields for the retrieved worker channel
type UpdateChannelInput ¶
type UpdateChannelInput struct { Available *bool `form:"Available,omitempty"` Capacity *int `form:"Capacity,omitempty"` }
UpdateChannelInput defines input fields for updating a worker channel resource
type UpdateChannelResponse ¶
type UpdateChannelResponse struct { AccountSid string `json:"account_sid"` AssignedTasks int `json:"assigned_tasks"` Available bool `json:"available"` AvailableCapacityPercentage int `json:"available_capacity_percentage"` ConfiguredCapacity int `json:"configured_capacity"` DateCreated time.Time `json:"date_created"` DateUpdated *time.Time `json:"date_updated,omitempty"` Sid string `json:"sid"` TaskChannelSid string `json:"task_channel_sid"` TaskChannelUniqueName string `json:"task_channel_unique_name"` URL string `json:"url"` WorkerSid string `json:"worker_sid"` WorkspaceSid string `json:"workspace_sid"` }
UpdateChannelResponse defines the response fields for the updated worker channel