service

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Overview

Package service contains auto-generated files. DO NOT MODIFY

Package service contains auto-generated files. DO NOT MODIFY

Package service contains auto-generated files. DO NOT MODIFY

Package service 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 {
	Binding  func(string) *binding.Client
	Bindings *bindings.Client
	Channel  func(string) *channel.Client
	Channels *channels.Client
	Role     func(string) *role.Client
	Roles    *roles.Client
	User     func(string) *user.Client
	Users    *users.Client
	// contains filtered or unexported fields
}

Client for managing a specific service resource See https://www.twilio.com/docs/chat/rest/service-resource for more details

func New

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

New creates a new instance of the service client

func (Client) Delete

func (c Client) Delete() error

Delete removes a service resource from the account See https://www.twilio.com/docs/chat/rest/service-resource#delete-a-service-resource for more details Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information

func (Client) DeleteWithContext

func (c Client) DeleteWithContext(context context.Context) error

DeleteWithContext removes a service resource from the account See https://www.twilio.com/docs/chat/rest/service-resource#delete-a-service-resource for more details

func (Client) Fetch

func (c Client) Fetch() (*FetchServiceResponse, error)

Fetch retrieves a service resource See https://www.twilio.com/docs/chat/rest/service-resource#fetch-a-service-resource for more details Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information

func (Client) FetchWithContext

func (c Client) FetchWithContext(context context.Context) (*FetchServiceResponse, error)

FetchWithContext retrieves a service resource See https://www.twilio.com/docs/chat/rest/service-resource#fetch-a-service-resource for more details

func (Client) Update

Update modifies a service resource See https://www.twilio.com/docs/chat/rest/service-resource#update-a-service-resource for more details Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information

func (Client) UpdateWithContext

func (c Client) UpdateWithContext(context context.Context, input *UpdateServiceInput) (*UpdateServiceResponse, error)

UpdateWithContext modifies a service resource See https://www.twilio.com/docs/chat/rest/service-resource#update-a-service-resource for more details

type ClientProperties

type ClientProperties struct {
	Sid string
}

ClientProperties are the properties required to manage the service resources

type FetchServiceLimitsResponse added in v0.6.0

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

type FetchServiceMediaResponse added in v0.6.0

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

type FetchServiceNotificationsActionResponse added in v0.6.0

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

type FetchServiceNotificationsNewMessageResponse added in v0.6.0

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

type FetchServiceNotificationsResponse added in v0.6.0

type FetchServiceNotificationsResponse struct {
	AddedToChannel     FetchServiceNotificationsActionResponse     `json:"added_to_channel"`
	InvitedToChannel   FetchServiceNotificationsActionResponse     `json:"invited_to_channel"`
	LogEnabled         bool                                        `json:"log_enabled"`
	NewMessage         FetchServiceNotificationsNewMessageResponse `json:"new_message"`
	RemovedFromChannel FetchServiceNotificationsActionResponse     `json:"removed_from_channel"`
}

type FetchServiceResponse

type FetchServiceResponse 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                       FetchServiceLimitsResponse        `json:"limits"`
	Media                        FetchServiceMediaResponse         `json:"media"`
	Notifications                FetchServiceNotificationsResponse `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"`
}

FetchServiceResponse defines the response fields for the retrieved service

type UpdateServiceInput

type UpdateServiceInput struct {
	ConsumptionReportInterval    *int                             `form:"ConsumptionReportInterval,omitempty"`
	DefaultChannelCreatorRoleSid *string                          `form:"DefaultChannelCreatorRoleSid,omitempty"`
	DefaultChannelRoleSid        *string                          `form:"DefaultChannelRoleSid,omitempty"`
	DefaultServiceRoleSid        *string                          `form:"DefaultServiceRoleSid,omitempty"`
	FriendlyName                 *string                          `form:"FriendlyName,omitempty"`
	Limits                       *UpdateServiceLimitsInput        `form:"Limits,omitempty"`
	Media                        *UpdateServiceMediaInput         `form:"Media,omitempty"`
	Notifications                *UpdateServiceNotificationsInput `form:"Notifications,omitempty"`
	PostWebhookRetryCount        *int                             `form:"PostWebhookRetryCount,omitempty"`
	PostWebhookURL               *string                          `form:"PostWebhookUrl,omitempty"`
	PreWebhookRetryCount         *int                             `form:"PreWebhookRetryCount,omitempty"`
	PreWebhookURL                *string                          `form:"PreWebhookUrl,omitempty"`
	ReadStatusEnabled            *bool                            `form:"ReadStatusEnabled,omitempty"`
	TypingIndicatorTimeout       *int                             `form:"TypingIndicatorTimeout,omitempty"`
	WebhookFilters               *[]string                        `form:"WebhookFilters,omitempty"`
	WebhookMethod                *string                          `form:"WebhookMethod,omitempty"`
}

UpdateServiceInput defines the input fields for updating a service resource

type UpdateServiceLimitsInput added in v0.6.0

type UpdateServiceLimitsInput struct {
	ChannelMembers *int `form:"ChannelMembers,omitempty"`
	UserChannels   *int `form:"UserChannels,omitempty"`
}

type UpdateServiceLimitsResponse added in v0.6.0

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

type UpdateServiceMediaInput added in v0.6.0

type UpdateServiceMediaInput struct {
	CompatibilityMessage *string `form:"CompatibilityMessage,omitempty"`
}

type UpdateServiceMediaResponse added in v0.6.0

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

type UpdateServiceNotificationsActionInput added in v0.6.0

type UpdateServiceNotificationsActionInput struct {
	Enabled  *bool   `form:"Enabled,omitempty"`
	Sound    *string `form:"Sound,omitempty"`
	Template *string `form:"Template,omitempty"`
}

type UpdateServiceNotificationsActionResponse added in v0.6.0

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

type UpdateServiceNotificationsInput added in v0.6.0

type UpdateServiceNotificationsInput struct {
	AddedToChannel     *UpdateServiceNotificationsActionInput     `form:"AddedToChannel,omitempty"`
	InvitedToChannel   *UpdateServiceNotificationsActionInput     `form:"InvitedToChannel,omitempty"`
	LogEnabled         *bool                                      `form:"LogEnabled,omitempty"`
	NewMessage         *UpdateServiceNotificationsNewMessageInput `form:"NewMessage,omitempty"`
	RemovedFromChannel *UpdateServiceNotificationsActionInput     `form:"RemovedFromChannel,omitempty"`
}

type UpdateServiceNotificationsNewMessageInput added in v0.6.0

type UpdateServiceNotificationsNewMessageInput struct {
	BadgeCountEnabled *bool   `form:"BadgeCountEnabled,omitempty"`
	Enabled           *bool   `form:"Enabled,omitempty"`
	Sound             *string `form:"Sound,omitempty"`
	Template          *string `form:"Template,omitempty"`
}

type UpdateServiceNotificationsNewMessageResponse added in v0.6.0

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

type UpdateServiceNotificationsResponse added in v0.6.0

type UpdateServiceNotificationsResponse struct {
	AddedToChannel     UpdateServiceNotificationsActionResponse     `json:"added_to_channel"`
	InvitedToChannel   UpdateServiceNotificationsActionResponse     `json:"invited_to_channel"`
	LogEnabled         bool                                         `json:"log_enabled"`
	NewMessage         UpdateServiceNotificationsNewMessageResponse `json:"new_message"`
	RemovedFromChannel UpdateServiceNotificationsActionResponse     `json:"removed_from_channel"`
}

type UpdateServiceResponse

type UpdateServiceResponse 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                       UpdateServiceLimitsResponse        `json:"limits"`
	Media                        UpdateServiceMediaResponse         `json:"media"`
	Notifications                UpdateServiceNotificationsResponse `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"`
}

UpdateServiceResponse defines the response fields for the updated service

Directories

Path Synopsis
Package binding contains auto-generated files.
Package binding contains auto-generated files.
Package bindings contains auto-generated files.
Package bindings contains auto-generated files.
Package channel contains auto-generated files.
Package channel contains auto-generated files.
invite
Package invite contains auto-generated files.
Package invite contains auto-generated files.
invites
Package invites contains auto-generated files.
Package invites contains auto-generated files.
member
Package member contains auto-generated files.
Package member contains auto-generated files.
members
Package members contains auto-generated files.
Package members contains auto-generated files.
message
Package message contains auto-generated files.
Package message contains auto-generated files.
messages
Package messages contains auto-generated files.
Package messages contains auto-generated files.
webhook
Package webhook contains auto-generated files.
Package webhook contains auto-generated files.
webhooks
Package webhooks contains auto-generated files.
Package webhooks contains auto-generated files.
Package channels contains auto-generated files.
Package channels contains auto-generated files.
Package role contains auto-generated files.
Package role contains auto-generated files.
Package roles contains auto-generated files.
Package roles contains auto-generated files.
Package user contains auto-generated files.
Package user contains auto-generated files.
binding
Package binding contains auto-generated files.
Package binding contains auto-generated files.
bindings
Package bindings contains auto-generated files.
Package bindings contains auto-generated files.
channel
Package channel contains auto-generated files.
Package channel contains auto-generated files.
channels
Package channels contains auto-generated files.
Package channels contains auto-generated files.
Package users contains auto-generated files.
Package users contains auto-generated files.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL