tasks

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: 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/autopilot/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/autopilot/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/autopilot/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/autopilot/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/autopilot/api/task#read-multiple-task-resources for more details

type ClientProperties

type ClientProperties struct {
	AssistantSid string
}

ClientProperties are the properties required to manage the tasks resources

type CreateTaskInput

type CreateTaskInput struct {
	Actions      *string `form:"Actions,omitempty"`
	ActionsURL   *string `form:"ActionsUrl,omitempty"`
	FriendlyName *string `form:"FriendlyName,omitempty"`
	UniqueName   string  `validate:"required" form:"UniqueName"`
}

CreateTaskInput defines the input fields for creating a new task resource

type CreateTaskResponse

type CreateTaskResponse struct {
	AccountSid   string     `json:"account_sid"`
	ActionsURL   string     `json:"actions_url"`
	AssistantSid string     `json:"assistant_sid"`
	DateCreated  time.Time  `json:"date_created"`
	DateUpdated  *time.Time `json:"date_updated,omitempty"`
	FriendlyName *string    `json:"friendly_name,omitempty"`
	Sid          string     `json:"sid"`
	URL          string     `json:"url"`
	UniqueName   string     `json:"unique_name"`
}

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"`
	ActionsURL   string     `json:"actions_url"`
	AssistantSid string     `json:"assistant_sid"`
	DateCreated  time.Time  `json:"date_created"`
	DateUpdated  *time.Time `json:"date_updated,omitempty"`
	FriendlyName *string    `json:"friendly_name,omitempty"`
	Sid          string     `json:"sid"`
	URL          string     `json:"url"`
	UniqueName   string     `json:"unique_name"`
}

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
}

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