tasks

package
Version: v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2022 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Overview

Package tasks contains auto-generated files. DO NOT MODIFY

Package tasks contains auto-generated files. DO NOT MODIFY

Package tasks 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 task resources See https://www.twilio.com/docs/taskrouter/api/task for more details

func New

func New(client *client.Client, properties ClientProperties) *Client

New creates a new instance of the tasks client

func (Client) Create

func (c Client) Create(input *CreateTaskInput) (*CreateTaskResponse, error)

Create creates a new task See https://www.twilio.com/docs/taskrouter/api/task#create-a-task-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 *CreateTaskInput) (*CreateTaskResponse, error)

CreateWithContext creates a new task See https://www.twilio.com/docs/taskrouter/api/task#create-a-task-resource for more details

func (*Client) NewTasksPaginator

func (c *Client) NewTasksPaginator() *TasksPaginator

NewTasksPaginator creates a new instance of the paginator for Page.

func (*Client) NewTasksPaginatorWithOptions

func (c *Client) NewTasksPaginatorWithOptions(options *TasksPageOptions) *TasksPaginator

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

func (Client) Page

func (c Client) Page(options *TasksPageOptions) (*TasksPageResponse, error)

Page retrieves a page of tasks See https://www.twilio.com/docs/taskrouter/api/task#read-multiple-task-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 *TasksPageOptions) (*TasksPageResponse, error)

PageWithContext retrieves a page of tasks See https://www.twilio.com/docs/taskrouter/api/task#read-multiple-task-resources for more details

type ClientProperties

type ClientProperties struct {
	WorkspaceSid string
}

ClientProperties are the properties required to manage the tasks resources

type CreateTaskInput

type CreateTaskInput struct {
	Attributes  *string `form:"Attributes,omitempty"`
	Priority    *int    `form:"Priority,omitempty"`
	TaskChannel *string `form:"TaskChannel,omitempty"`
	Timeout     *int    `form:"Timeout,omitempty"`
	WorkflowSid *string `form:"WorkflowSid,omitempty"`
}

CreateTaskInput defines the input fields for creating a new task resource

type CreateTaskResponse

type CreateTaskResponse struct {
	AccountSid            string      `json:"account_sid"`
	Age                   int         `json:"age"`
	AssignmentStatus      string      `json:"assignment_status"`
	Attributes            interface{} `json:"attributes"`
	DateCreated           time.Time   `json:"date_created"`
	DateUpdated           *time.Time  `json:"date_updated,omitempty"`
	Priority              *int        `json:"priority,omitempty"`
	Reason                *string     `json:"reason,omitempty"`
	Sid                   string      `json:"sid"`
	TaskChannelSid        *string     `json:"task_channel_sid,omitempty"`
	TaskChannelUniqueName *string     `json:"task_channel_unique_name,omitempty"`
	TaskQueueEnteredDate  *time.Time  `json:"task_queue_entered_date,omitempty"`
	TaskQueueFriendlyName *string     `json:"task_queue_friendly_name,omitempty"`
	TaskQueueSid          *string     `json:"task_queue_sid,omitempty"`
	Timeout               int         `json:"timeout"`
	URL                   string      `json:"url"`
	WorkflowFriendlyName  *string     `json:"workflow_friendly_name,omitempty"`
	WorkflowSid           *string     `json:"workflow_sid,omitempty"`
	WorkspaceSid          string      `json:"workspace_sid"`
}

CreateTaskResponse defines the response fields for the created task

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 PageTaskResponse

type PageTaskResponse struct {
	AccountSid            string      `json:"account_sid"`
	Age                   int         `json:"age"`
	AssignmentStatus      string      `json:"assignment_status"`
	Attributes            interface{} `json:"attributes"`
	DateCreated           time.Time   `json:"date_created"`
	DateUpdated           *time.Time  `json:"date_updated,omitempty"`
	Priority              *int        `json:"priority,omitempty"`
	Reason                *string     `json:"reason,omitempty"`
	Sid                   string      `json:"sid"`
	TaskChannelSid        *string     `json:"task_channel_sid,omitempty"`
	TaskChannelUniqueName *string     `json:"task_channel_unique_name,omitempty"`
	TaskQueueEnteredDate  *time.Time  `json:"task_queue_entered_date,omitempty"`
	TaskQueueFriendlyName *string     `json:"task_queue_friendly_name,omitempty"`
	TaskQueueSid          *string     `json:"task_queue_sid,omitempty"`
	Timeout               int         `json:"timeout"`
	URL                   string      `json:"url"`
	WorkflowFriendlyName  *string     `json:"workflow_friendly_name,omitempty"`
	WorkflowSid           *string     `json:"workflow_sid,omitempty"`
	WorkspaceSid          string      `json:"workspace_sid"`
}

type TasksPage

type TasksPage struct {
	CurrentPage *TasksPageResponse
	Error       error
	// contains filtered or unexported fields
}

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

type TasksPageOptions

type TasksPageOptions struct {
	PageSize               *int
	Page                   *int
	PageToken              *string
	Priority               *int
	AssignmentStatus       *[]string
	WorkflowSid            *string
	WorkflowName           *string
	TaskQueueSid           *string
	TaskQueueName          *string
	EvaluateTaskAttributes *string
	Ordering               *string
	HasAddons              *bool
}

TasksPageOptions defines the query options for the api operation

type TasksPageResponse

type TasksPageResponse struct {
	Meta  PageMetaResponse   `json:"meta"`
	Tasks []PageTaskResponse `json:"tasks"`
}

TasksPageResponse defines the response fields for the tasks page

type TasksPaginator

type TasksPaginator struct {
	Page  *TasksPage
	Tasks []PageTaskResponse
	// contains filtered or unexported fields
}

TasksPaginator defines the fields for makings paginated api calls Tasks is an array of tasks that have been returned from all of the page calls

func (*TasksPaginator) CurrentPage

func (p *TasksPaginator) CurrentPage() *TasksPageResponse

CurrentPage retrieves the results for the current page

func (*TasksPaginator) Error

func (p *TasksPaginator) Error() error

Error retrieves the error returned from the page

func (*TasksPaginator) Next

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

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