domains

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: 6 Imported by: 2

Documentation

Overview

Package domains contains auto-generated files. DO NOT MODIFY

Package domains contains auto-generated files. DO NOT MODIFY

Package domains 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 SIP domain resources

func New

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

New creates a new instance of the domains client

func (Client) Create

func (c Client) Create(input *CreateDomainInput) (*CreateDomainResponse, error)

Create creates a SIP domain resource See https://www.twilio.com/docs/voice/sip/api/sip-domain-resource#create-a-sipdomain-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 *CreateDomainInput) (*CreateDomainResponse, error)

CreateWithContext creates a SIP domain resource See https://www.twilio.com/docs/voice/sip/api/sip-domain-resource#create-a-sipdomain-resource for more details

func (*Client) NewDomainsPaginator

func (c *Client) NewDomainsPaginator() *DomainsPaginator

NewDomainsPaginator creates a new instance of the paginator for Page.

func (*Client) NewDomainsPaginatorWithOptions

func (c *Client) NewDomainsPaginatorWithOptions(options *DomainsPageOptions) *DomainsPaginator

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

func (Client) Page

func (c Client) Page(options *DomainsPageOptions) (*DomainsPageResponse, error)

Page retrieves a page of SIP domains See https://www.twilio.com/docs/voice/sip/api/sip-domain-resource#read-multiple-sipdomain-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 *DomainsPageOptions) (*DomainsPageResponse, error)

PageWithContext retrieves a page of SIP domains See https://www.twilio.com/docs/voice/sip/api/sip-domain-resource#read-multiple-sipdomain-resources for more details

type ClientProperties

type ClientProperties struct {
	AccountSid string
}

ClientProperties are the properties required to manage the domains resources

type CreateDomainInput

type CreateDomainInput struct {
	ByocTrunkSid              *string `form:"ByocTrunkSid,omitempty"`
	DomainName                string  `validate:"required" form:"DomainName"`
	EmergencyCallerSid        *string `form:"EmergencyCallerSid,omitempty"`
	EmergencyCallingEnabled   *bool   `form:"EmergencyCallingEnabled,omitempty"`
	FriendlyName              *string `form:"FriendlyName,omitempty"`
	Secure                    *bool   `form:"Secure,omitempty"`
	SipRegistration           *bool   `form:"SipRegistration,omitempty"`
	VoiceFallbackMethod       *string `form:"VoiceFallbackMethod,omitempty"`
	VoiceFallbackURL          *string `form:"VoiceFallbackUrl,omitempty"`
	VoiceMethod               *string `form:"VoiceMethod,omitempty"`
	VoiceStatusCallbackMethod *string `form:"VoiceStatusCallbackMethod,omitempty"`
	VoiceStatusCallbackURL    *string `form:"VoiceStatusCallbackUrl,omitempty"`
	VoiceURL                  *string `form:"VoiceUrl,omitempty"`
}

CreateDomainInput defines input fields for creating a new SIP domain

type CreateDomainResponse

type CreateDomainResponse struct {
	AccountSid                string             `json:"account_sid"`
	ApiVersion                string             `json:"api_version"`
	AuthType                  *string            `json:"auth_type,omitempty"`
	ByocTrunkSid              *string            `json:"byoc_trunk_sid,omitempty"`
	DateCreated               utils.RFC2822Time  `json:"date_created"`
	DateUpdated               *utils.RFC2822Time `json:"date_updated,omitempty"`
	DomainName                string             `json:"domain_name"`
	EmergencyCallerSid        *string            `json:"emergency_caller_sid,omitempty"`
	EmergencyCallingEnabled   bool               `json:"emergency_calling_enabled"`
	FriendlyName              *string            `json:"friendly_name,omitempty"`
	Secure                    bool               `json:"secure"`
	Sid                       string             `json:"sid"`
	SipRegistration           bool               `json:"sip_registration"`
	VoiceFallbackMethod       *string            `json:"voice_fallback_method,omitempty"`
	VoiceFallbackURL          *string            `json:"voice_fallback_url,omitempty"`
	VoiceMethod               *string            `json:"voice_method,omitempty"`
	VoiceStatusCallbackMethod *string            `json:"voice_status_callback_method,omitempty"`
	VoiceStatusCallbackURL    *string            `json:"voice_status_callback_url,omitempty"`
	VoiceURL                  *string            `json:"voice_url,omitempty"`
}

CreateDomainResponse defines the response fields for creating a new SIP domain

type DomainsPage

type DomainsPage struct {
	CurrentPage *DomainsPageResponse
	Error       error
	// contains filtered or unexported fields
}

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

type DomainsPageOptions

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

DomainsPageOptions defines the query options for the api operation

type DomainsPageResponse

type DomainsPageResponse struct {
	Domains         []PageDomainResponse `json:"domains"`
	End             int                  `json:"end"`
	FirstPageURI    string               `json:"first_page_uri"`
	NextPageURI     *string              `json:"next_page_uri,omitempty"`
	Page            int                  `json:"page"`
	PageSize        int                  `json:"page_size"`
	PreviousPageURI *string              `json:"previous_page_uri,omitempty"`
	Start           int                  `json:"start"`
	URI             string               `json:"uri"`
}

DomainsPageResponse defines the response fields for the SIP domains page

type DomainsPaginator

type DomainsPaginator struct {
	Page    *DomainsPage
	Domains []PageDomainResponse
	// contains filtered or unexported fields
}

DomainsPaginator defines the fields for makings paginated api calls Domains is an array of domains that have been returned from all of the page calls

func (*DomainsPaginator) CurrentPage

func (p *DomainsPaginator) CurrentPage() *DomainsPageResponse

CurrentPage retrieves the results for the current page

func (*DomainsPaginator) Error

func (p *DomainsPaginator) Error() error

Error retrieves the error returned from the page

func (*DomainsPaginator) Next

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

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

type PageDomainResponse

type PageDomainResponse struct {
	AccountSid                string             `json:"account_sid"`
	ApiVersion                string             `json:"api_version"`
	AuthType                  *string            `json:"auth_type,omitempty"`
	ByocTrunkSid              *string            `json:"byoc_trunk_sid,omitempty"`
	DateCreated               utils.RFC2822Time  `json:"date_created"`
	DateUpdated               *utils.RFC2822Time `json:"date_updated,omitempty"`
	DomainName                string             `json:"domain_name"`
	EmergencyCallerSid        *string            `json:"emergency_caller_sid,omitempty"`
	EmergencyCallingEnabled   bool               `json:"emergency_calling_enabled"`
	FriendlyName              *string            `json:"friendly_name,omitempty"`
	Secure                    bool               `json:"secure"`
	Sid                       string             `json:"sid"`
	SipRegistration           bool               `json:"sip_registration"`
	VoiceFallbackMethod       *string            `json:"voice_fallback_method,omitempty"`
	VoiceFallbackURL          *string            `json:"voice_fallback_url,omitempty"`
	VoiceMethod               *string            `json:"voice_method,omitempty"`
	VoiceStatusCallbackMethod *string            `json:"voice_status_callback_method,omitempty"`
	VoiceStatusCallbackURL    *string            `json:"voice_status_callback_url,omitempty"`
	VoiceURL                  *string            `json:"voice_url,omitempty"`
}

Jump to

Keyboard shortcuts

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