channel

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: 4 Imported by: 1

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

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

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

type ClientProperties struct {
	Sid          string
	WorkerSid    string
	WorkspaceSid string
}

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

Jump to

Keyboard shortcuts

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