Documentation
¶
Overview ¶
Package users contains auto-generated files. DO NOT MODIFY
Package users contains auto-generated files. DO NOT MODIFY
Package users contains auto-generated files. DO NOT MODIFY
Index ¶
- type Client
- func (c Client) Create(input *CreateUserInput) (*CreateUserResponse, error)
- func (c Client) CreateWithContext(context context.Context, input *CreateUserInput) (*CreateUserResponse, error)
- func (c *Client) NewUsersPaginator() *UsersPaginator
- func (c *Client) NewUsersPaginatorWithOptions(options *UsersPageOptions) *UsersPaginator
- func (c Client) Page(options *UsersPageOptions) (*UsersPageResponse, error)
- func (c Client) PageWithContext(context context.Context, options *UsersPageOptions) (*UsersPageResponse, error)
- type CreateUserInput
- type CreateUserResponse
- type PageMetaResponse
- type PageUserResponse
- type UsersPage
- type UsersPageOptions
- type UsersPageResponse
- type UsersPaginator
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 user resources See https://www.twilio.com/docs/conversations/api/user-resource for more details
func (Client) Create ¶
func (c Client) Create(input *CreateUserInput) (*CreateUserResponse, error)
Create creates a new user See https://www.twilio.com/docs/conversations/api/user-resource#create-a-conversations-user 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 *CreateUserInput) (*CreateUserResponse, error)
CreateWithContext creates a new user See https://www.twilio.com/docs/conversations/api/user-resource#create-a-conversations-user for more details
func (*Client) NewUsersPaginator ¶
func (c *Client) NewUsersPaginator() *UsersPaginator
NewUsersPaginator creates a new instance of the paginator for Page.
func (*Client) NewUsersPaginatorWithOptions ¶
func (c *Client) NewUsersPaginatorWithOptions(options *UsersPageOptions) *UsersPaginator
NewUsersPaginatorWithOptions creates a new instance of the paginator for Page with options.
func (Client) Page ¶
func (c Client) Page(options *UsersPageOptions) (*UsersPageResponse, error)
Page retrieves a page of users See https://www.twilio.com/docs/conversations/api/user-resource#read-multiple-conversationuser-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 *UsersPageOptions) (*UsersPageResponse, error)
PageWithContext retrieves a page of users See https://www.twilio.com/docs/conversations/api/user-resource#read-multiple-conversationuser-resources for more details
type CreateUserInput ¶
type CreateUserInput struct { Attributes *string `form:"Attributes,omitempty"` FriendlyName *string `form:"FriendlyName,omitempty"` Identity string `validate:"required" form:"Identity"` RoleSid *string `form:"RoleSid,omitempty"` }
CreateUserInput defines the input fields for creating a new user resource
type CreateUserResponse ¶
type CreateUserResponse struct { AccountSid string `json:"account_sid"` Attributes string `json:"attributes"` ChatServiceSid string `json:"chat_service_sid"` DateCreated time.Time `json:"date_created"` DateUpdated *time.Time `json:"date_updated,omitempty"` FriendlyName *string `json:"friendly_name,omitempty"` Identity string `json:"identity"` IsNotifiable *bool `json:"is_notifiable,omitempty"` IsOnline *bool `json:"is_online,omitempty"` RoleSid string `json:"role_sid"` Sid string `json:"sid"` URL string `json:"url"` }
CreateUserResponse defines the response fields for the created user
type PageMetaResponse ¶
type PageUserResponse ¶
type PageUserResponse struct { AccountSid string `json:"account_sid"` Attributes string `json:"attributes"` ChatServiceSid string `json:"chat_service_sid"` DateCreated time.Time `json:"date_created"` DateUpdated *time.Time `json:"date_updated,omitempty"` FriendlyName *string `json:"friendly_name,omitempty"` Identity string `json:"identity"` IsNotifiable *bool `json:"is_notifiable,omitempty"` IsOnline *bool `json:"is_online,omitempty"` RoleSid string `json:"role_sid"` Sid string `json:"sid"` URL string `json:"url"` }
type UsersPage ¶
type UsersPage struct { CurrentPage *UsersPageResponse Error error // contains filtered or unexported fields }
UsersPage defines the fields for the page The CurrentPage and Error fields can be used to access the PageUserResponse or error that is returned from the api call(s)
type UsersPageOptions ¶
UsersPageOptions defines the query options for the api operation
type UsersPageResponse ¶
type UsersPageResponse struct { Meta PageMetaResponse `json:"meta"` Users []PageUserResponse `json:"users"` }
UsersPageResponse defines the response fields for the users page
type UsersPaginator ¶
type UsersPaginator struct { Page *UsersPage Users []PageUserResponse // contains filtered or unexported fields }
UsersPaginator defines the fields for makings paginated api calls Users is an array of users that have been returned from all of the page calls
func (*UsersPaginator) CurrentPage ¶
func (p *UsersPaginator) CurrentPage() *UsersPageResponse
CurrentPage retrieves the results for the current page
func (*UsersPaginator) Error ¶
func (p *UsersPaginator) Error() error
Error retrieves the error returned from the page
func (*UsersPaginator) Next ¶
func (p *UsersPaginator) 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 (*UsersPaginator) NextWithContext ¶
func (p *UsersPaginator) 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