workspaces

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

Package workspaces contains auto-generated files. DO NOT MODIFY

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

func New

func New(client *client.Client) *Client

New creates a new instance of the workspaces client

func (Client) Create

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

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

func (*Client) NewWorkspacesPaginator

func (c *Client) NewWorkspacesPaginator() *WorkspacesPaginator

NewWorkspacesPaginator creates a new instance of the paginator for Page.

func (*Client) NewWorkspacesPaginatorWithOptions

func (c *Client) NewWorkspacesPaginatorWithOptions(options *WorkspacesPageOptions) *WorkspacesPaginator

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

func (Client) Page

Page retrieves a page of workspaces See https://www.twilio.com/docs/taskrouter/api/workspace#list-all-workspaces 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 *WorkspacesPageOptions) (*WorkspacesPageResponse, error)

PageWithContext retrieves a page of workspaces See https://www.twilio.com/docs/taskrouter/api/workspace#list-all-workspaces for more details

type CreateWorkspaceInput

type CreateWorkspaceInput struct {
	EventCallbackURL     *string `form:"EventCallbackUrl,omitempty"`
	EventsFilter         *string `form:"EventsFilter,omitempty"`
	FriendlyName         string  `validate:"required" form:"FriendlyName"`
	MultiTaskEnabled     *bool   `form:"MultiTaskEnabled,omitempty"`
	PrioritizeQueueOrder *string `form:"PrioritizeQueueOrder,omitempty"`
	Template             *string `form:"Template,omitempty"`
}

CreateWorkspaceInput defines the input fields for creating a new workspace resource

type CreateWorkspaceResponse

type CreateWorkspaceResponse struct {
	AccountSid           string     `json:"account_sid"`
	DateCreated          time.Time  `json:"date_created"`
	DateUpdated          *time.Time `json:"date_updated,omitempty"`
	DefaultActivityName  string     `json:"default_activity_name"`
	DefaultActivitySid   string     `json:"default_activity_sid"`
	EventCallbackURL     *string    `json:"event_callback_url,omitempty"`
	EventsFilter         *string    `json:"events_filter,omitempty"`
	FriendlyName         string     `json:"friendly_name"`
	MultiTaskEnabled     bool       `json:"multi_task_enabled"`
	PrioritizeQueueOrder string     `json:"prioritize_queue_order"`
	Sid                  string     `json:"sid"`
	TimeoutActivityName  string     `json:"timeout_activity_name"`
	TimeoutActivitySid   string     `json:"timeout_activity_sid"`
	URL                  string     `json:"url"`
}

CreateWorkspaceResponse defines the response fields for the created workspace

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 PageWorkspaceResponse

type PageWorkspaceResponse struct {
	AccountSid           string     `json:"account_sid"`
	DateCreated          time.Time  `json:"date_created"`
	DateUpdated          *time.Time `json:"date_updated,omitempty"`
	DefaultActivityName  string     `json:"default_activity_name"`
	DefaultActivitySid   string     `json:"default_activity_sid"`
	EventCallbackURL     *string    `json:"event_callback_url,omitempty"`
	EventsFilter         *string    `json:"events_filter,omitempty"`
	FriendlyName         string     `json:"friendly_name"`
	MultiTaskEnabled     bool       `json:"multi_task_enabled"`
	PrioritizeQueueOrder string     `json:"prioritize_queue_order"`
	Sid                  string     `json:"sid"`
	TimeoutActivityName  string     `json:"timeout_activity_name"`
	TimeoutActivitySid   string     `json:"timeout_activity_sid"`
	URL                  string     `json:"url"`
}

type WorkspacesPage

type WorkspacesPage struct {
	CurrentPage *WorkspacesPageResponse
	Error       error
	// contains filtered or unexported fields
}

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

type WorkspacesPageOptions

type WorkspacesPageOptions struct {
	PageSize     *int
	Page         *int
	PageToken    *string
	FriendlyName *string
}

WorkspacesPageOptions defines the query options for the api operation

type WorkspacesPageResponse

type WorkspacesPageResponse struct {
	Meta       PageMetaResponse        `json:"meta"`
	Workspaces []PageWorkspaceResponse `json:"workspaces"`
}

WorkspacesPageResponse defines the response fields for the workspaces page

type WorkspacesPaginator

type WorkspacesPaginator struct {
	Page       *WorkspacesPage
	Workspaces []PageWorkspaceResponse
	// contains filtered or unexported fields
}

WorkspacesPaginator defines the fields for makings paginated api calls Workspaces is an array of workspaces that have been returned from all of the page calls

func (*WorkspacesPaginator) CurrentPage

func (p *WorkspacesPaginator) CurrentPage() *WorkspacesPageResponse

CurrentPage retrieves the results for the current page

func (*WorkspacesPaginator) Error

func (p *WorkspacesPaginator) Error() error

Error retrieves the error returned from the page

func (*WorkspacesPaginator) Next

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

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