Documentation ¶
Overview ¶
This is an autogenerated file. DO NOT MODIFY
This is an autogenerated file. DO NOT MODIFY
This is an autogenerated file. DO NOT MODIFY
This is an autogenerated file. DO NOT MODIFY
Index ¶
- type Client
- func (c Client) Delete() error
- func (c Client) DeleteWithContext(context context.Context) error
- func (c Client) Fetch() (*FetchRoleResponse, error)
- func (c Client) FetchWithContext(context context.Context) (*FetchRoleResponse, error)
- func (c Client) Update(input *UpdateRoleInput) (*UpdateRoleResponse, error)
- func (c Client) UpdateWithContext(context context.Context, input *UpdateRoleInput) (*UpdateRoleResponse, error)
- type ClientProperties
- type FetchRoleResponse
- type UpdateRoleInput
- type UpdateRoleResponse
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 a specific role resource See https://www.twilio.com/docs/chat/rest/role-resource for more details
func New ¶
func New(client *client.Client, properties ClientProperties) *Client
New creates a new instance of the role client
func (Client) Delete ¶
Delete removes a role resource from the account See https://www.twilio.com/docs/chat/rest/role-resource#delete-a-role-resource for more details Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information
func (Client) DeleteWithContext ¶
DeleteWithContext removes a role resource from the account See https://www.twilio.com/docs/chat/rest/role-resource#delete-a-role-resource for more details
func (Client) Fetch ¶
func (c Client) Fetch() (*FetchRoleResponse, error)
Fetch retrieves a role resource See https://www.twilio.com/docs/chat/rest/role-resource#fetch-a-role-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) (*FetchRoleResponse, error)
FetchWithContext retrieves a role resource See https://www.twilio.com/docs/chat/rest/role-resource#fetch-a-role-resource for more details
func (Client) Update ¶
func (c Client) Update(input *UpdateRoleInput) (*UpdateRoleResponse, error)
Update modifies a role resource See https://www.twilio.com/docs/chat/rest/role-resource#update-a-role-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 *UpdateRoleInput) (*UpdateRoleResponse, error)
UpdateWithContext modifies a role resource See https://www.twilio.com/docs/chat/rest/role-resource#update-a-role-resource for more details
type ClientProperties ¶
ClientProperties are the properties required to manage the role resources
type FetchRoleResponse ¶
type FetchRoleResponse struct { AccountSid string `json:"account_sid"` DateCreated time.Time `json:"date_created"` DateUpdated *time.Time `json:"date_updated,omitempty"` FriendlyName string `json:"friendly_name"` Permissions []string `json:"permissions"` ServiceSid string `json:"service_sid"` Sid string `json:"sid"` Type string `json:"type"` URL string `json:"url"` }
FetchRoleResponse defines the response fields for the retrieved role
type UpdateRoleInput ¶
type UpdateRoleInput struct {
Permission []string `validate:"required" form:"Permission"`
}
UpdateRoleInput defines input fields for updating a role resource
type UpdateRoleResponse ¶
type UpdateRoleResponse struct { AccountSid string `json:"account_sid"` DateCreated time.Time `json:"date_created"` DateUpdated *time.Time `json:"date_updated,omitempty"` FriendlyName string `json:"friendly_name"` Permissions []string `json:"permissions"` ServiceSid string `json:"service_sid"` Sid string `json:"sid"` Type string `json:"type"` URL string `json:"url"` }
UpdateRoleResponse defines the response fields for the updated role