reservations

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: 1

Documentation

Overview

Package reservations contains auto-generated files. DO NOT MODIFY

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

func New

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

New creates a new instance of the reservations client

func (*Client) NewReservationsPaginator

func (c *Client) NewReservationsPaginator() *ReservationsPaginator

NewReservationsPaginator creates a new instance of the paginator for Page.

func (*Client) NewReservationsPaginatorWithOptions

func (c *Client) NewReservationsPaginatorWithOptions(options *ReservationsPageOptions) *ReservationsPaginator

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

func (Client) Page

Page retrieves a page of worker reservations See https://www.twilio.com/docs/taskrouter/api/worker-reservation#read-multiple-workerreservation-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 *ReservationsPageOptions) (*ReservationsPageResponse, error)

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

type ClientProperties

type ClientProperties struct {
	WorkerSid    string
	WorkspaceSid string
}

ClientProperties are the properties required to manage the reservations resources

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 PageReservationResponse

type PageReservationResponse struct {
	AccountSid        string     `json:"account_sid"`
	DateCreated       time.Time  `json:"date_created"`
	DateUpdated       *time.Time `json:"date_updated,omitempty"`
	ReservationStatus string     `json:"reservation_status"`
	Sid               string     `json:"sid"`
	TaskSid           string     `json:"task_sid"`
	URL               string     `json:"url"`
	WorkerName        string     `json:"worker_name"`
	WorkerSid         string     `json:"worker_sid"`
	WorkspaceSid      string     `json:"workspace_sid"`
}

type ReservationsPage

type ReservationsPage struct {
	CurrentPage *ReservationsPageResponse
	Error       error
	// contains filtered or unexported fields
}

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

type ReservationsPageOptions

type ReservationsPageOptions struct {
	PageSize          *int
	Page              *int
	PageToken         *string
	ReservationStatus *string
}

ReservationsPageOptions defines the query options for the api operation

type ReservationsPageResponse

type ReservationsPageResponse struct {
	Meta         PageMetaResponse          `json:"meta"`
	Reservations []PageReservationResponse `json:"reservations"`
}

ReservationsPageResponse defines the response fields for the worker reservations page

type ReservationsPaginator

type ReservationsPaginator struct {
	Page         *ReservationsPage
	Reservations []PageReservationResponse
	// contains filtered or unexported fields
}

ReservationsPaginator defines the fields for makings paginated api calls Reservations is an array of reservations that have been returned from all of the page calls

func (*ReservationsPaginator) CurrentPage

CurrentPage retrieves the results for the current page

func (*ReservationsPaginator) Error

func (p *ReservationsPaginator) Error() error

Error retrieves the error returned from the page

func (*ReservationsPaginator) Next

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

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