services

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

Package services contains auto-generated files. DO NOT MODIFY

Package services 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 service resources See https://www.twilio.com/docs/chat/rest/service-resource for more details

func New

func New(client *client.Client) *Client

New creates a new instance of the services client

func (Client) Create

Create creates a new service See https://www.twilio.com/docs/chat/rest/service-resource#create-a-service-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 *CreateServiceInput) (*CreateServiceResponse, error)

CreateWithContext creates a new service See https://www.twilio.com/docs/chat/rest/service-resource#create-a-service-resource for more details

func (*Client) NewServicesPaginator

func (c *Client) NewServicesPaginator() *ServicesPaginator

NewServicesPaginator creates a new instance of the paginator for Page.

func (*Client) NewServicesPaginatorWithOptions

func (c *Client) NewServicesPaginatorWithOptions(options *ServicesPageOptions) *ServicesPaginator

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

func (Client) Page

Page retrieves a page of services See https://www.twilio.com/docs/chat/rest/service-resource#read-multiple-service-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 *ServicesPageOptions) (*ServicesPageResponse, error)

PageWithContext retrieves a page of services See https://www.twilio.com/docs/chat/rest/service-resource#read-multiple-service-resources for more details

type CreateServiceInput

type CreateServiceInput struct {
	FriendlyName string `validate:"required" form:"FriendlyName"`
}

CreateServiceInput defines the input fields for creating a new service resource

type CreateServiceLimitsResponse added in v0.6.0

type CreateServiceLimitsResponse struct {
	ChannelMembers int `json:"channel_members"`
	UserChannels   int `json:"user_channels"`
}

type CreateServiceMediaResponse added in v0.6.0

type CreateServiceMediaResponse struct {
	CompatibilityMessage string `json:"compatibility_message"`
	SizeLimitMB          int    `json:"size_limit_mb"`
}

type CreateServiceNotificationsActionResponse added in v0.6.0

type CreateServiceNotificationsActionResponse struct {
	Enabled  bool    `json:"enabled"`
	Sound    *string `json:"sound,omitempty"`
	Template *string `json:"template,omitempty"`
}

type CreateServiceNotificationsNewMessageResponse added in v0.6.0

type CreateServiceNotificationsNewMessageResponse struct {
	BadgeCountEnabled *bool   `json:"badge_count_enabled,omitempty"`
	Enabled           bool    `json:"enabled"`
	Sound             *string `json:"sound,omitempty"`
	Template          *string `json:"template,omitempty"`
}

type CreateServiceNotificationsResponse added in v0.6.0

type CreateServiceNotificationsResponse struct {
	AddedToChannel     CreateServiceNotificationsActionResponse     `json:"added_to_channel"`
	InvitedToChannel   CreateServiceNotificationsActionResponse     `json:"invited_to_channel"`
	LogEnabled         bool                                         `json:"log_enabled"`
	NewMessage         CreateServiceNotificationsNewMessageResponse `json:"new_message"`
	RemovedFromChannel CreateServiceNotificationsActionResponse     `json:"removed_from_channel"`
}

type CreateServiceResponse

type CreateServiceResponse struct {
	AccountSid                   string                             `json:"account_sid"`
	ConsumptionReportInterval    int                                `json:"consumption_report_interval"`
	DateCreated                  time.Time                          `json:"date_created"`
	DateUpdated                  *time.Time                         `json:"date_updated,omitempty"`
	DefaultChannelCreatorRoleSid string                             `json:"default_channel_creator_role_sid"`
	DefaultChannelRoleSid        string                             `json:"default_channel_role_sid"`
	DefaultServiceRoleSid        string                             `json:"default_service_role_sid"`
	FriendlyName                 string                             `json:"friendly_name"`
	Limits                       CreateServiceLimitsResponse        `json:"limits"`
	Media                        CreateServiceMediaResponse         `json:"media"`
	Notifications                CreateServiceNotificationsResponse `json:"notifications"`
	PostWebhookRetryCount        *int                               `json:"post_webhook_retry_count,omitempty"`
	PostWebhookURL               *string                            `json:"post_webhook_url,omitempty"`
	PreWebhookRetryCount         *int                               `json:"pre_webhook_retry_count,omitempty"`
	PreWebhookURL                *string                            `json:"pre_webhook_url,omitempty"`
	ReachabilityEnabled          bool                               `json:"reachability_enabled"`
	ReadStatusEnabled            bool                               `json:"read_status_enabled"`
	Sid                          string                             `json:"sid"`
	TypingIndicatorTimeout       int                                `json:"typing_indicator_timeout"`
	URL                          string                             `json:"url"`
	WebhookFilters               *[]string                          `json:"webhook_filters,omitempty"`
	WebhookMethod                *string                            `json:"webhook_method,omitempty"`
}

CreateServiceResponse defines the response fields for the created service

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 PageServiceLimitsResponse added in v0.6.0

type PageServiceLimitsResponse struct {
	ChannelMembers int `json:"channel_members"`
	UserChannels   int `json:"user_channels"`
}

type PageServiceMediaResponse added in v0.6.0

type PageServiceMediaResponse struct {
	CompatibilityMessage string `json:"compatibility_message"`
	SizeLimitMB          int    `json:"size_limit_mb"`
}

type PageServiceNotificationsActionResponse added in v0.6.0

type PageServiceNotificationsActionResponse struct {
	Enabled  bool    `json:"enabled"`
	Sound    *string `json:"sound,omitempty"`
	Template *string `json:"template,omitempty"`
}

type PageServiceNotificationsNewMessageResponse added in v0.6.0

type PageServiceNotificationsNewMessageResponse struct {
	BadgeCountEnabled *bool   `json:"badge_count_enabled,omitempty"`
	Enabled           bool    `json:"enabled"`
	Sound             *string `json:"sound,omitempty"`
	Template          *string `json:"template,omitempty"`
}

type PageServiceNotificationsResponse added in v0.6.0

type PageServiceNotificationsResponse struct {
	AddedToChannel     PageServiceNotificationsActionResponse     `json:"added_to_channel"`
	InvitedToChannel   PageServiceNotificationsActionResponse     `json:"invited_to_channel"`
	LogEnabled         bool                                       `json:"log_enabled"`
	NewMessage         PageServiceNotificationsNewMessageResponse `json:"new_message"`
	RemovedFromChannel PageServiceNotificationsActionResponse     `json:"removed_from_channel"`
}

type PageServiceResponse

type PageServiceResponse struct {
	AccountSid                   string                           `json:"account_sid"`
	ConsumptionReportInterval    int                              `json:"consumption_report_interval"`
	DateCreated                  time.Time                        `json:"date_created"`
	DateUpdated                  *time.Time                       `json:"date_updated,omitempty"`
	DefaultChannelCreatorRoleSid string                           `json:"default_channel_creator_role_sid"`
	DefaultChannelRoleSid        string                           `json:"default_channel_role_sid"`
	DefaultServiceRoleSid        string                           `json:"default_service_role_sid"`
	FriendlyName                 string                           `json:"friendly_name"`
	Limits                       PageServiceLimitsResponse        `json:"limits"`
	Media                        PageServiceMediaResponse         `json:"media"`
	Notifications                PageServiceNotificationsResponse `json:"notifications"`
	PostWebhookRetryCount        *int                             `json:"post_webhook_retry_count,omitempty"`
	PostWebhookURL               *string                          `json:"post_webhook_url,omitempty"`
	PreWebhookRetryCount         *int                             `json:"pre_webhook_retry_count,omitempty"`
	PreWebhookURL                *string                          `json:"pre_webhook_url,omitempty"`
	ReachabilityEnabled          bool                             `json:"reachability_enabled"`
	ReadStatusEnabled            bool                             `json:"read_status_enabled"`
	Sid                          string                           `json:"sid"`
	TypingIndicatorTimeout       int                              `json:"typing_indicator_timeout"`
	URL                          string                           `json:"url"`
	WebhookFilters               *[]string                        `json:"webhook_filters,omitempty"`
	WebhookMethod                *string                          `json:"webhook_method,omitempty"`
}

type ServicesPage

type ServicesPage struct {
	CurrentPage *ServicesPageResponse
	Error       error
	// contains filtered or unexported fields
}

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

type ServicesPageOptions

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

ServicesPageOptions defines the query options for the api operation

type ServicesPageResponse

type ServicesPageResponse struct {
	Meta     PageMetaResponse      `json:"meta"`
	Services []PageServiceResponse `json:"services"`
}

ServicesPageResponse defines the response fields for the services page

type ServicesPaginator

type ServicesPaginator struct {
	Page     *ServicesPage
	Services []PageServiceResponse
	// contains filtered or unexported fields
}

ServicesPaginator defines the fields for makings paginated api calls Services is an array of services that have been returned from all of the page calls

func (*ServicesPaginator) CurrentPage

func (p *ServicesPaginator) CurrentPage() *ServicesPageResponse

CurrentPage retrieves the results for the current page

func (*ServicesPaginator) Error

func (p *ServicesPaginator) Error() error

Error retrieves the error returned from the page

func (*ServicesPaginator) Next

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

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