role

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2020 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Overview

Package role contains auto-generated files. DO NOT MODIFY

Package role contains auto-generated files. DO NOT MODIFY

Package role contains auto-generated files. DO NOT MODIFY

Package role 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 a specific role resource See https://www.twilio.com/docs/conversations/api/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

func (c Client) Delete() error

Delete removes a role resource from the account See https://www.twilio.com/docs/conversations/api/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

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

DeleteWithContext removes a role resource from the account See https://www.twilio.com/docs/conversations/api/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/conversations/api/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/conversations/api/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/conversations/api/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/conversations/api/role-resource#update-a-role-resource for more details

type ClientProperties

type ClientProperties struct {
	ServiceSid string
	Sid        string
}

ClientProperties are the properties required to manage the role resources

type FetchRoleResponse

type FetchRoleResponse struct {
	AccountSid     string     `json:"account_sid"`
	ChatServiceSid string     `json:"chat_service_sid"`
	DateCreated    time.Time  `json:"date_created"`
	DateUpdated    *time.Time `json:"date_updated,omitempty"`
	FriendlyName   string     `json:"friendly_name"`
	Permissions    []string   `json:"permissions"`
	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 {
	Permissions []string `validate:"required" form:"Permission"`
}

UpdateRoleInput defines input fields for updating a role resource

type UpdateRoleResponse

type UpdateRoleResponse struct {
	AccountSid     string     `json:"account_sid"`
	ChatServiceSid string     `json:"chat_service_sid"`
	DateCreated    time.Time  `json:"date_created"`
	DateUpdated    *time.Time `json:"date_updated,omitempty"`
	FriendlyName   string     `json:"friendly_name"`
	Permissions    []string   `json:"permissions"`
	Sid            string     `json:"sid"`
	Type           string     `json:"type"`
	URL            string     `json:"url"`
}

UpdateRoleResponse defines the response fields for the updated role

Jump to

Keyboard shortcuts

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