Documentation
¶
Overview ¶
Package queries contains auto-generated files. DO NOT MODIFY
Package queries contains auto-generated files. DO NOT MODIFY
Package queries contains auto-generated files. DO NOT MODIFY
Index ¶
- type Client
- func (c Client) Create(input *CreateQueryInput) (*CreateQueryResponse, error)
- func (c Client) CreateWithContext(context context.Context, input *CreateQueryInput) (*CreateQueryResponse, error)
- func (c *Client) NewQueriesPaginator() *QueriesPaginator
- func (c *Client) NewQueriesPaginatorWithOptions(options *QueriesPageOptions) *QueriesPaginator
- func (c Client) Page(options *QueriesPageOptions) (*QueriesPageResponse, error)
- func (c Client) PageWithContext(context context.Context, options *QueriesPageOptions) (*QueriesPageResponse, error)
- type ClientProperties
- type CreateQueryFieldResponse
- type CreateQueryInput
- type CreateQueryResponse
- type CreateQueryResultResponse
- type PageMetaResponse
- type PageQueryFieldResponse
- type PageQueryResponse
- type PageQueryResultResponse
- type QueriesPage
- type QueriesPageOptions
- type QueriesPageResponse
- type QueriesPaginator
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 query resources See https://www.twilio.com/docs/autopilot/api/query for more details
func New ¶
func New(client *client.Client, properties ClientProperties) *Client
New creates a new instance of the queries client
func (Client) Create ¶
func (c Client) Create(input *CreateQueryInput) (*CreateQueryResponse, error)
Create creates a new query resource See https://www.twilio.com/docs/autopilot/api/query#create-a-query-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 *CreateQueryInput) (*CreateQueryResponse, error)
CreateWithContext creates a new query resource See https://www.twilio.com/docs/autopilot/api/query#create-a-query-resource for more details
func (*Client) NewQueriesPaginator ¶
func (c *Client) NewQueriesPaginator() *QueriesPaginator
NewQueriesPaginator creates a new instance of the paginator for Page.
func (*Client) NewQueriesPaginatorWithOptions ¶
func (c *Client) NewQueriesPaginatorWithOptions(options *QueriesPageOptions) *QueriesPaginator
NewQueriesPaginatorWithOptions creates a new instance of the paginator for Page with options.
func (Client) Page ¶
func (c Client) Page(options *QueriesPageOptions) (*QueriesPageResponse, error)
Page retrieves a page of queries See https://www.twilio.com/docs/autopilot/api/query?code-sample=code-read-list-all-queries-for-an-assistant 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 *QueriesPageOptions) (*QueriesPageResponse, error)
PageWithContext retrieves a page of queries See https://www.twilio.com/docs/autopilot/api/query?code-sample=code-read-list-all-queries-for-an-assistant for more details
type ClientProperties ¶
type ClientProperties struct {
AssistantSid string
}
ClientProperties are the properties required to manage the queries resources
type CreateQueryInput ¶
type CreateQueryInput struct { Language string `validate:"required" form:"Language"` ModelBuild *string `form:"ModelBuild,omitempty"` Query string `validate:"required" form:"Query"` Tasks *string `form:"Tasks,omitempty"` }
CreateQueryInput defines the input fields for creating a new query resource
type CreateQueryResponse ¶
type CreateQueryResponse struct { AccountSid string `json:"account_sid"` AssistantSid string `json:"assistant_sid"` DateCreated time.Time `json:"date_created"` DateUpdated *time.Time `json:"date_updated,omitempty"` DialogueSid *string `json:"dialogue_sid,omitempty"` Language string `json:"language"` ModelBuildSid string `json:"model_build_sid"` Query string `json:"query"` Results CreateQueryResultResponse `json:"results"` SampleSid string `json:"sample_sid"` Sid string `json:"sid"` SourceChannel string `json:"source_channel"` Status string `json:"status"` URL string `json:"url"` }
CreateQueryResponse defines the response fields for the created query
type CreateQueryResultResponse ¶
type CreateQueryResultResponse struct { Fields []CreateQueryFieldResponse `json:"fields"` Task string `json:"task"` }
type PageMetaResponse ¶
type PageQueryFieldResponse ¶
type PageQueryResponse ¶
type PageQueryResponse struct { AccountSid string `json:"account_sid"` AssistantSid string `json:"assistant_sid"` DateCreated time.Time `json:"date_created"` DateUpdated *time.Time `json:"date_updated,omitempty"` DialogueSid *string `json:"dialogue_sid,omitempty"` Language string `json:"language"` ModelBuildSid string `json:"model_build_sid"` Query string `json:"query"` Results PageQueryResultResponse `json:"results"` SampleSid string `json:"sample_sid"` Sid string `json:"sid"` SourceChannel string `json:"source_channel"` Status string `json:"status"` URL string `json:"url"` }
type PageQueryResultResponse ¶
type PageQueryResultResponse struct { Fields []PageQueryFieldResponse `json:"fields"` Task string `json:"task"` }
type QueriesPage ¶
type QueriesPage struct { CurrentPage *QueriesPageResponse Error error // contains filtered or unexported fields }
QueriesPage defines the fields for the page The CurrentPage and Error fields can be used to access the PageQueryResponse or error that is returned from the api call(s)
type QueriesPageOptions ¶
type QueriesPageOptions struct { Language *string ModelBuild *string Status *string DialogueSid *string PageSize *int Page *int PageToken *string }
QueriesPageOptions defines the query options for the api operation
type QueriesPageResponse ¶
type QueriesPageResponse struct { Meta PageMetaResponse `json:"meta"` Queries []PageQueryResponse `json:"queries"` }
QueriesPageResponse defines the response fields for the query page
type QueriesPaginator ¶
type QueriesPaginator struct { Page *QueriesPage Queries []PageQueryResponse // contains filtered or unexported fields }
QueriesPaginator defines the fields for makings paginated api calls Queries is an array of queries that have been returned from all of the page calls
func (*QueriesPaginator) CurrentPage ¶
func (p *QueriesPaginator) CurrentPage() *QueriesPageResponse
CurrentPage retrieves the results for the current page
func (*QueriesPaginator) Error ¶
func (p *QueriesPaginator) Error() error
Error retrieves the error returned from the page
func (*QueriesPaginator) Next ¶
func (p *QueriesPaginator) 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 (*QueriesPaginator) NextWithContext ¶
func (p *QueriesPaginator) 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