items

package
v0.18.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2021 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Overview

Package items contains auto-generated files. DO NOT MODIFY

Package items contains auto-generated files. DO NOT MODIFY

Package items 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 map item resources See https://www.twilio.com/docs/sync/api/map-item-resource for more details

func New

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

New creates a new instance of the items client

func (Client) Create

Create creates a new map item See https://www.twilio.com/docs/sync/api/map-item-resource#create-a-mapitem-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 *CreateSyncMapItemInput) (*CreateSyncMapItemResponse, error)

CreateWithContext creates a new map item See https://www.twilio.com/docs/sync/api/map-item-resource#create-a-mapitem-resource for more details

func (*Client) NewSyncMapItemsPaginator

func (c *Client) NewSyncMapItemsPaginator() *SyncMapItemsPaginator

NewSyncMapItemsPaginator creates a new instance of the paginator for Page.

func (*Client) NewSyncMapItemsPaginatorWithOptions

func (c *Client) NewSyncMapItemsPaginatorWithOptions(options *SyncMapItemsPageOptions) *SyncMapItemsPaginator

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

func (Client) Page

Page retrieves a page of map items See https://www.twilio.com/docs/sync/api/map-item-resource#read-all-mapitem-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 *SyncMapItemsPageOptions) (*SyncMapItemsPageResponse, error)

PageWithContext retrieves a page of map items See https://www.twilio.com/docs/sync/api/map-item-resource#read-all-mapitem-resources for more details

type ClientProperties

type ClientProperties struct {
	ServiceSid string
	SyncMapSid string
}

ClientProperties are the properties required to manage the items resources

type CreateSyncMapItemInput

type CreateSyncMapItemInput struct {
	CollectionTtl *int   `form:"CollectionTtl,omitempty"`
	Data          string `validate:"required" form:"Data"`
	ItemTtl       *int   `form:"ItemTtl,omitempty"`
	Key           string `validate:"required" form:"Key"`
	Ttl           *int   `form:"Ttl,omitempty"`
}

CreateSyncMapItemInput defines the input fields for creating a new map item resource

type CreateSyncMapItemResponse

type CreateSyncMapItemResponse struct {
	AccountSid  string                 `json:"account_sid"`
	CreatedBy   string                 `json:"created_by"`
	Data        map[string]interface{} `json:"data"`
	DateCreated time.Time              `json:"date_created"`
	DateExpires *time.Time             `json:"date_expires,omitempty"`
	DateUpdated *time.Time             `json:"date_updated,omitempty"`
	Key         string                 `json:"key"`
	MapSid      string                 `json:"map_sid"`
	Revision    string                 `json:"revision"`
	ServiceSid  string                 `json:"service_Sid"`
	URL         string                 `json:"url"`
}

CreateSyncMapItemResponse defines the response fields for the created map item

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 PageSyncMapItemResponse

type PageSyncMapItemResponse struct {
	AccountSid  string                 `json:"account_sid"`
	CreatedBy   string                 `json:"created_by"`
	Data        map[string]interface{} `json:"data"`
	DateCreated time.Time              `json:"date_created"`
	DateExpires *time.Time             `json:"date_expires,omitempty"`
	DateUpdated *time.Time             `json:"date_updated,omitempty"`
	Key         string                 `json:"key"`
	MapSid      string                 `json:"map_sid"`
	Revision    string                 `json:"revision"`
	ServiceSid  string                 `json:"service_Sid"`
	URL         string                 `json:"url"`
}

type SyncMapItemsPage

type SyncMapItemsPage struct {
	CurrentPage *SyncMapItemsPageResponse
	Error       error
	// contains filtered or unexported fields
}

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

type SyncMapItemsPageOptions

type SyncMapItemsPageOptions struct {
	PageSize    *int
	Page        *int
	PageToken   *string
	Order       *string
	From        *string
	Bounds      *string
	HideExpired *bool
}

SyncMapItemsPageOptions defines the query options for the api operation

type SyncMapItemsPageResponse

type SyncMapItemsPageResponse struct {
	Items []PageSyncMapItemResponse `json:"items"`
	Meta  PageMetaResponse          `json:"meta"`
}

SyncMapItemsPageResponse defines the response fields for the map items page

type SyncMapItemsPaginator

type SyncMapItemsPaginator struct {
	Page  *SyncMapItemsPage
	Items []PageSyncMapItemResponse
	// contains filtered or unexported fields
}

SyncMapItemsPaginator defines the fields for makings paginated api calls Items is an array of items that have been returned from all of the page calls

func (*SyncMapItemsPaginator) CurrentPage

CurrentPage retrieves the results for the current page

func (*SyncMapItemsPaginator) Error

func (p *SyncMapItemsPaginator) Error() error

Error retrieves the error returned from the page

func (*SyncMapItemsPaginator) Next

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

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