fields

package
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 fields contains auto-generated files. DO NOT MODIFY

Package fields contains auto-generated files. DO NOT MODIFY

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

func New

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

New creates a new instance of the fields client

func (Client) Create

func (c Client) Create(input *CreateFieldInput) (*CreateFieldResponse, error)

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

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

func (*Client) NewFieldsPaginator

func (c *Client) NewFieldsPaginator() *FieldsPaginator

NewFieldsPaginator creates a new instance of the paginator for Page.

func (*Client) NewFieldsPaginatorWithOptions

func (c *Client) NewFieldsPaginatorWithOptions(options *FieldsPageOptions) *FieldsPaginator

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

func (Client) Page

func (c Client) Page(options *FieldsPageOptions) (*FieldsPageResponse, error)

Page retrieves a page of fields See https://www.twilio.com/docs/autopilot/api/task-field#read-multiple-field-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 *FieldsPageOptions) (*FieldsPageResponse, error)

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

type ClientProperties

type ClientProperties struct {
	AssistantSid string
	TaskSid      string
}

ClientProperties are the properties required to manage the fields resources

type CreateFieldInput

type CreateFieldInput struct {
	FieldType  string `validate:"required" form:"FieldType"`
	UniqueName string `validate:"required" form:"UniqueName"`
}

CreateFieldInput defines the input fields for creating a new task field resource

type CreateFieldResponse

type CreateFieldResponse struct {
	AccountSid   string     `json:"account_sid"`
	AssistantSid string     `json:"assistant_sid"`
	DateCreated  time.Time  `json:"date_created"`
	DateUpdated  *time.Time `json:"date_updated,omitempty"`
	FieldType    string     `json:"field_type"`
	Sid          string     `json:"sid"`
	TaskSid      string     `json:"task_sid"`
	URL          string     `json:"url"`
	UniqueName   string     `json:"unique_name"`
}

CreateFieldResponse defines the response fields for the created task field

type FieldsPage

type FieldsPage struct {
	CurrentPage *FieldsPageResponse
	Error       error
	// contains filtered or unexported fields
}

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

type FieldsPageOptions

type FieldsPageOptions struct {
	PageSize  *int
	Page      *int
	PageToken *string
}

FieldsPageOptions defines the query options for the api operation

type FieldsPageResponse

type FieldsPageResponse struct {
	Fields []PageFieldResponse `json:"fields"`
	Meta   PageMetaResponse    `json:"meta"`
}

FieldsPageResponse defines the response fields for the fields page

type FieldsPaginator

type FieldsPaginator struct {
	Page   *FieldsPage
	Fields []PageFieldResponse
	// contains filtered or unexported fields
}

FieldsPaginator defines the fields for makings paginated api calls Fields is an array of fields that have been returned from all of the page calls

func (*FieldsPaginator) CurrentPage

func (p *FieldsPaginator) CurrentPage() *FieldsPageResponse

CurrentPage retrieves the results for the current page

func (*FieldsPaginator) Error

func (p *FieldsPaginator) Error() error

Error retrieves the error returned from the page

func (*FieldsPaginator) Next

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

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

type PageFieldResponse

type PageFieldResponse struct {
	AccountSid   string     `json:"account_sid"`
	AssistantSid string     `json:"assistant_sid"`
	DateCreated  time.Time  `json:"date_created"`
	DateUpdated  *time.Time `json:"date_updated,omitempty"`
	FieldType    string     `json:"field_type"`
	Sid          string     `json:"sid"`
	TaskSid      string     `json:"task_sid"`
	URL          string     `json:"url"`
	UniqueName   string     `json:"unique_name"`
}

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"`
}

Jump to

Keyboard shortcuts

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