openapi

package
v0.22.1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: MIT Imports: 6 Imported by: 1

README

Go API client for openapi

This is the public Twilio REST API.

Overview

This API client was generated by the OpenAPI Generator project from the OpenAPI specs located at twilio/twilio-oai. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 1.27.1
  • Package version: 1.0.0
  • Build package: com.twilio.oai.TwilioGoGenerator For more information, please visit https://support.twilio.com

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import "./openapi"

Documentation for API Endpoints

All URIs are relative to https://proxy.twilio.com

Class Method HTTP request Description
ServicesApi CreateService Post /v1/Services
ServicesApi DeleteService Delete /v1/Services/{Sid}
ServicesApi FetchService Get /v1/Services/{Sid}
ServicesApi ListService Get /v1/Services
ServicesApi UpdateService Post /v1/Services/{Sid}
ServicesPhoneNumbersApi CreatePhoneNumber Post /v1/Services/{ServiceSid}/PhoneNumbers
ServicesPhoneNumbersApi DeletePhoneNumber Delete /v1/Services/{ServiceSid}/PhoneNumbers/{Sid}
ServicesPhoneNumbersApi FetchPhoneNumber Get /v1/Services/{ServiceSid}/PhoneNumbers/{Sid}
ServicesPhoneNumbersApi ListPhoneNumber Get /v1/Services/{ServiceSid}/PhoneNumbers
ServicesPhoneNumbersApi UpdatePhoneNumber Post /v1/Services/{ServiceSid}/PhoneNumbers/{Sid}
ServicesSessionsApi CreateSession Post /v1/Services/{ServiceSid}/Sessions
ServicesSessionsApi DeleteSession Delete /v1/Services/{ServiceSid}/Sessions/{Sid}
ServicesSessionsApi FetchSession Get /v1/Services/{ServiceSid}/Sessions/{Sid}
ServicesSessionsApi ListSession Get /v1/Services/{ServiceSid}/Sessions
ServicesSessionsApi UpdateSession Post /v1/Services/{ServiceSid}/Sessions/{Sid}
ServicesSessionsInteractionsApi DeleteInteraction Delete /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions/{Sid}
ServicesSessionsInteractionsApi FetchInteraction Get /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions/{Sid}
ServicesSessionsInteractionsApi ListInteraction Get /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions
ServicesSessionsParticipantsApi CreateParticipant Post /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants
ServicesSessionsParticipantsApi DeleteParticipant Delete /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{Sid}
ServicesSessionsParticipantsApi FetchParticipant Get /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{Sid}
ServicesSessionsParticipantsApi ListParticipant Get /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants
ServicesSessionsParticipantsMessageInteractionsApi CreateMessageInteraction Post /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions
ServicesSessionsParticipantsMessageInteractionsApi FetchMessageInteraction Get /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions/{Sid}
ServicesSessionsParticipantsMessageInteractionsApi ListMessageInteraction Get /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions
ServicesShortCodesApi CreateShortCode Post /v1/Services/{ServiceSid}/ShortCodes
ServicesShortCodesApi DeleteShortCode Delete /v1/Services/{ServiceSid}/ShortCodes/{Sid}
ServicesShortCodesApi FetchShortCode Get /v1/Services/{ServiceSid}/ShortCodes/{Sid}
ServicesShortCodesApi ListShortCode Get /v1/Services/{ServiceSid}/ShortCodes
ServicesShortCodesApi UpdateShortCode Post /v1/Services/{ServiceSid}/ShortCodes/{Sid}

Documentation For Models

Documentation For Authorization

accountSid_authToken

  • Type: HTTP basic authentication

Example

auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
    UserName: "username",
    Password: "password",
})
r, err := client.Service.Operation(auth, args)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiService added in v0.11.0

type ApiService struct {
	// contains filtered or unexported fields
}

func NewApiService added in v0.11.0

func NewApiService(requestHandler *twilio.RequestHandler) *ApiService

func NewApiServiceWithClient added in v0.11.0

func NewApiServiceWithClient(client twilio.BaseClient) *ApiService

func (*ApiService) CreateMessageInteraction added in v0.11.0

func (c *ApiService) CreateMessageInteraction(ServiceSid string, SessionSid string, ParticipantSid string, params *CreateMessageInteractionParams) (*ProxyV1MessageInteraction, error)

Create a new message Interaction to send directly from your system to one [Participant](https://www.twilio.com/docs/proxy/api/participant). The `inbound` properties for the Interaction will always be empty.

func (*ApiService) CreateParticipant added in v0.11.0

func (c *ApiService) CreateParticipant(ServiceSid string, SessionSid string, params *CreateParticipantParams) (*ProxyV1Participant, error)

Add a new Participant to the Session

func (*ApiService) CreatePhoneNumber added in v0.11.0

func (c *ApiService) CreatePhoneNumber(ServiceSid string, params *CreatePhoneNumberParams) (*ProxyV1PhoneNumber, error)

Add a Phone Number to a Service's Proxy Number Pool.

func (*ApiService) CreateService added in v0.11.0

func (c *ApiService) CreateService(params *CreateServiceParams) (*ProxyV1Service, error)

Create a new Service for Twilio Proxy

func (*ApiService) CreateSession added in v0.11.0

func (c *ApiService) CreateSession(ServiceSid string, params *CreateSessionParams) (*ProxyV1Session, error)

Create a new Session

func (*ApiService) CreateShortCode added in v0.11.0

func (c *ApiService) CreateShortCode(ServiceSid string, params *CreateShortCodeParams) (*ProxyV1ShortCode, error)

Add a Short Code to the Proxy Number Pool for the Service.

func (*ApiService) DeleteInteraction added in v0.11.0

func (c *ApiService) DeleteInteraction(ServiceSid string, SessionSid string, Sid string) error

Delete a specific Interaction.

func (*ApiService) DeleteParticipant added in v0.11.0

func (c *ApiService) DeleteParticipant(ServiceSid string, SessionSid string, Sid string) error

Delete a specific Participant. This is a soft-delete. The participant remains associated with the session and cannot be re-added. Participants are only permanently deleted when the [Session](https://www.twilio.com/docs/proxy/api/session) is deleted.

func (*ApiService) DeletePhoneNumber added in v0.11.0

func (c *ApiService) DeletePhoneNumber(ServiceSid string, Sid string) error

Delete a specific Phone Number from a Service.

func (*ApiService) DeleteService added in v0.11.0

func (c *ApiService) DeleteService(Sid string) error

Delete a specific Service.

func (*ApiService) DeleteSession added in v0.11.0

func (c *ApiService) DeleteSession(ServiceSid string, Sid string) error

Delete a specific Session.

func (*ApiService) DeleteShortCode added in v0.11.0

func (c *ApiService) DeleteShortCode(ServiceSid string, Sid string) error

Delete a specific Short Code from a Service.

func (*ApiService) FetchInteraction added in v0.11.0

func (c *ApiService) FetchInteraction(ServiceSid string, SessionSid string, Sid string) (*ProxyV1Interaction, error)

Retrieve a list of Interactions for a given [Session](https://www.twilio.com/docs/proxy/api/session).

func (*ApiService) FetchMessageInteraction added in v0.11.0

func (c *ApiService) FetchMessageInteraction(ServiceSid string, SessionSid string, ParticipantSid string, Sid string) (*ProxyV1MessageInteraction, error)

func (*ApiService) FetchParticipant added in v0.11.0

func (c *ApiService) FetchParticipant(ServiceSid string, SessionSid string, Sid string) (*ProxyV1Participant, error)

Fetch a specific Participant.

func (*ApiService) FetchPhoneNumber added in v0.11.0

func (c *ApiService) FetchPhoneNumber(ServiceSid string, Sid string) (*ProxyV1PhoneNumber, error)

Fetch a specific Phone Number.

func (*ApiService) FetchService added in v0.11.0

func (c *ApiService) FetchService(Sid string) (*ProxyV1Service, error)

Fetch a specific Service.

func (*ApiService) FetchSession added in v0.11.0

func (c *ApiService) FetchSession(ServiceSid string, Sid string) (*ProxyV1Session, error)

Fetch a specific Session.

func (*ApiService) FetchShortCode added in v0.11.0

func (c *ApiService) FetchShortCode(ServiceSid string, Sid string) (*ProxyV1ShortCode, error)

Fetch a specific Short Code.

func (*ApiService) ListInteraction added in v0.11.0

func (c *ApiService) ListInteraction(ServiceSid string, SessionSid string, params *ListInteractionParams) ([]ProxyV1Interaction, error)

Lists Interaction records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.

func (*ApiService) ListMessageInteraction added in v0.11.0

func (c *ApiService) ListMessageInteraction(ServiceSid string, SessionSid string, ParticipantSid string, params *ListMessageInteractionParams) ([]ProxyV1MessageInteraction, error)

Lists MessageInteraction records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.

func (*ApiService) ListParticipant added in v0.11.0

func (c *ApiService) ListParticipant(ServiceSid string, SessionSid string, params *ListParticipantParams) ([]ProxyV1Participant, error)

Lists Participant records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.

func (*ApiService) ListPhoneNumber added in v0.11.0

func (c *ApiService) ListPhoneNumber(ServiceSid string, params *ListPhoneNumberParams) ([]ProxyV1PhoneNumber, error)

Lists PhoneNumber records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.

func (*ApiService) ListService added in v0.11.0

func (c *ApiService) ListService(params *ListServiceParams) ([]ProxyV1Service, error)

Lists Service records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.

func (*ApiService) ListSession added in v0.11.0

func (c *ApiService) ListSession(ServiceSid string, params *ListSessionParams) ([]ProxyV1Session, error)

Lists Session records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.

func (*ApiService) ListShortCode added in v0.11.0

func (c *ApiService) ListShortCode(ServiceSid string, params *ListShortCodeParams) ([]ProxyV1ShortCode, error)

Lists ShortCode records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.

func (*ApiService) PageInteraction added in v0.13.0

func (c *ApiService) PageInteraction(ServiceSid string, SessionSid string, params *ListInteractionParams, pageToken, pageNumber string) (*ListInteractionResponse, error)

Retrieve a single page of Interaction records from the API. Request is executed immediately.

func (*ApiService) PageMessageInteraction added in v0.13.0

func (c *ApiService) PageMessageInteraction(ServiceSid string, SessionSid string, ParticipantSid string, params *ListMessageInteractionParams, pageToken, pageNumber string) (*ListMessageInteractionResponse, error)

Retrieve a single page of MessageInteraction records from the API. Request is executed immediately.

func (*ApiService) PageParticipant added in v0.13.0

func (c *ApiService) PageParticipant(ServiceSid string, SessionSid string, params *ListParticipantParams, pageToken, pageNumber string) (*ListParticipantResponse, error)

Retrieve a single page of Participant records from the API. Request is executed immediately.

func (*ApiService) PagePhoneNumber added in v0.13.0

func (c *ApiService) PagePhoneNumber(ServiceSid string, params *ListPhoneNumberParams, pageToken, pageNumber string) (*ListPhoneNumberResponse, error)

Retrieve a single page of PhoneNumber records from the API. Request is executed immediately.

func (*ApiService) PageService added in v0.13.0

func (c *ApiService) PageService(params *ListServiceParams, pageToken, pageNumber string) (*ListServiceResponse, error)

Retrieve a single page of Service records from the API. Request is executed immediately.

func (*ApiService) PageSession added in v0.13.0

func (c *ApiService) PageSession(ServiceSid string, params *ListSessionParams, pageToken, pageNumber string) (*ListSessionResponse, error)

Retrieve a single page of Session records from the API. Request is executed immediately.

func (*ApiService) PageShortCode added in v0.13.0

func (c *ApiService) PageShortCode(ServiceSid string, params *ListShortCodeParams, pageToken, pageNumber string) (*ListShortCodeResponse, error)

Retrieve a single page of ShortCode records from the API. Request is executed immediately.

func (*ApiService) StreamInteraction added in v0.13.0

func (c *ApiService) StreamInteraction(ServiceSid string, SessionSid string, params *ListInteractionParams) (chan ProxyV1Interaction, error)

Streams Interaction records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.

func (*ApiService) StreamMessageInteraction added in v0.13.0

func (c *ApiService) StreamMessageInteraction(ServiceSid string, SessionSid string, ParticipantSid string, params *ListMessageInteractionParams) (chan ProxyV1MessageInteraction, error)

Streams MessageInteraction records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.

func (*ApiService) StreamParticipant added in v0.13.0

func (c *ApiService) StreamParticipant(ServiceSid string, SessionSid string, params *ListParticipantParams) (chan ProxyV1Participant, error)

Streams Participant records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.

func (*ApiService) StreamPhoneNumber added in v0.13.0

func (c *ApiService) StreamPhoneNumber(ServiceSid string, params *ListPhoneNumberParams) (chan ProxyV1PhoneNumber, error)

Streams PhoneNumber records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.

func (*ApiService) StreamService added in v0.13.0

func (c *ApiService) StreamService(params *ListServiceParams) (chan ProxyV1Service, error)

Streams Service records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.

func (*ApiService) StreamSession added in v0.13.0

func (c *ApiService) StreamSession(ServiceSid string, params *ListSessionParams) (chan ProxyV1Session, error)

Streams Session records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.

func (*ApiService) StreamShortCode added in v0.13.0

func (c *ApiService) StreamShortCode(ServiceSid string, params *ListShortCodeParams) (chan ProxyV1ShortCode, error)

Streams ShortCode records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.

func (*ApiService) UpdatePhoneNumber added in v0.11.0

func (c *ApiService) UpdatePhoneNumber(ServiceSid string, Sid string, params *UpdatePhoneNumberParams) (*ProxyV1PhoneNumber, error)

Update a specific Proxy Number.

func (*ApiService) UpdateService added in v0.11.0

func (c *ApiService) UpdateService(Sid string, params *UpdateServiceParams) (*ProxyV1Service, error)

Update a specific Service.

func (*ApiService) UpdateSession added in v0.11.0

func (c *ApiService) UpdateSession(ServiceSid string, Sid string, params *UpdateSessionParams) (*ProxyV1Session, error)

Update a specific Session.

func (*ApiService) UpdateShortCode added in v0.11.0

func (c *ApiService) UpdateShortCode(ServiceSid string, Sid string, params *UpdateShortCodeParams) (*ProxyV1ShortCode, error)

Update a specific Short Code.

type CreateMessageInteractionParams

type CreateMessageInteractionParams struct {
	// The message to send to the participant
	Body *string `json:"Body,omitempty"`
	// Reserved. Not currently supported.
	MediaUrl *[]string `json:"MediaUrl,omitempty"`
}

Optional parameters for the method 'CreateMessageInteraction'

func (*CreateMessageInteractionParams) SetBody

func (*CreateMessageInteractionParams) SetMediaUrl

func (params *CreateMessageInteractionParams) SetMediaUrl(MediaUrl []string) *CreateMessageInteractionParams

type CreateParticipantParams

type CreateParticipantParams struct {
	// [Experimental] For accounts with the ProxyAllowParticipantConflict account flag, setting to true enables per-request opt-in to allowing Proxy to reject a Participant create request that could cause the same Identifier/ProxyIdentifier pair to be active in multiple Sessions. Depending on the context, this could be a 409 error (Twilio error code 80623) or a 400 error (Twilio error code 80604). If not provided, requests will be allowed to succeed and a Debugger notification (80802) will be emitted. Having multiple, active Participants with the same Identifier/ProxyIdentifier pair causes calls and messages from affected Participants to be routed incorrectly. Please note, the default behavior for accounts without the ProxyAllowParticipantConflict flag is to reject the request as described.  This will eventually be the default for all accounts.
	FailOnParticipantConflict *bool `json:"FailOnParticipantConflict,omitempty"`
	// The string that you assigned to describe the participant. This value must be 255 characters or fewer. **This value should not have PII.**
	FriendlyName *string `json:"FriendlyName,omitempty"`
	// The phone number of the Participant.
	Identifier *string `json:"Identifier,omitempty"`
	// The proxy phone number to use for the Participant. If not specified, Proxy will select a number from the pool.
	ProxyIdentifier *string `json:"ProxyIdentifier,omitempty"`
	// The SID of the Proxy Identifier to assign to the Participant.
	ProxyIdentifierSid *string `json:"ProxyIdentifierSid,omitempty"`
}

Optional parameters for the method 'CreateParticipant'

func (*CreateParticipantParams) SetFailOnParticipantConflict

func (params *CreateParticipantParams) SetFailOnParticipantConflict(FailOnParticipantConflict bool) *CreateParticipantParams

func (*CreateParticipantParams) SetFriendlyName

func (params *CreateParticipantParams) SetFriendlyName(FriendlyName string) *CreateParticipantParams

func (*CreateParticipantParams) SetIdentifier

func (params *CreateParticipantParams) SetIdentifier(Identifier string) *CreateParticipantParams

func (*CreateParticipantParams) SetProxyIdentifier

func (params *CreateParticipantParams) SetProxyIdentifier(ProxyIdentifier string) *CreateParticipantParams

func (*CreateParticipantParams) SetProxyIdentifierSid

func (params *CreateParticipantParams) SetProxyIdentifierSid(ProxyIdentifierSid string) *CreateParticipantParams

type CreatePhoneNumberParams

type CreatePhoneNumberParams struct {
	// Whether the new phone number should be reserved and not be assigned to a participant using proxy pool logic. See [Reserved Phone Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more information.
	IsReserved *bool `json:"IsReserved,omitempty"`
	// The phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format.  E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234.
	PhoneNumber *string `json:"PhoneNumber,omitempty"`
	// The SID of a Twilio [IncomingPhoneNumber](https://www.twilio.com/docs/phone-numbers/api/incomingphonenumber-resource) resource that represents the Twilio Number you would like to assign to your Proxy Service.
	Sid *string `json:"Sid,omitempty"`
}

Optional parameters for the method 'CreatePhoneNumber'

func (*CreatePhoneNumberParams) SetIsReserved

func (params *CreatePhoneNumberParams) SetIsReserved(IsReserved bool) *CreatePhoneNumberParams

func (*CreatePhoneNumberParams) SetPhoneNumber

func (params *CreatePhoneNumberParams) SetPhoneNumber(PhoneNumber string) *CreatePhoneNumberParams

func (*CreatePhoneNumberParams) SetSid

type CreateServiceParams

type CreateServiceParams struct {
	// The URL we should call when the interaction status changes.
	CallbackUrl *string `json:"CallbackUrl,omitempty"`
	// The SID of the Chat Service Instance managed by Proxy Service. The Chat Service enables Proxy to forward SMS and channel messages to this chat instance. This is a one-to-one relationship.
	ChatInstanceSid *string `json:"ChatInstanceSid,omitempty"`
	// The default `ttl` value to set for Sessions created in the Service. The TTL (time to live) is measured in seconds after the Session's last create or last Interaction. The default value of `0` indicates an unlimited Session length. You can override a Session's default TTL value by setting its `ttl` value.
	DefaultTtl *int `json:"DefaultTtl,omitempty"`
	// Where a proxy number must be located relative to the participant identifier. Can be: `country`, `area-code`, or `extended-area-code`. The default value is `country` and more specific areas than `country` are only available in North America.
	GeoMatchLevel *string `json:"GeoMatchLevel,omitempty"`
	// The URL we call on each interaction. If we receive a 403 status, we block the interaction; otherwise the interaction continues.
	InterceptCallbackUrl *string `json:"InterceptCallbackUrl,omitempty"`
	// The preference for Proxy Number selection in the Service instance. Can be: `prefer-sticky` or `avoid-sticky` and the default is `prefer-sticky`. `prefer-sticky` means that we will try and select the same Proxy Number for a given participant if they have previous [Sessions](https://www.twilio.com/docs/proxy/api/session), but we will not fail if that Proxy Number cannot be used.  `avoid-sticky` means that we will try to use different Proxy Numbers as long as that is possible within a given pool rather than try and use a previously assigned number.
	NumberSelectionBehavior *string `json:"NumberSelectionBehavior,omitempty"`
	// The URL we should call when an inbound call or SMS action occurs on a closed or non-existent Session. If your server (or a Twilio [function](https://www.twilio.com/functions)) responds with valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This means it is possible, for example, to play a message for a call, send an automated text message response, or redirect a call to another Phone Number. See [Out-of-Session Callback Response Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide) for more information.
	OutOfSessionCallbackUrl *string `json:"OutOfSessionCallbackUrl,omitempty"`
	// An application-defined string that uniquely identifies the resource. This value must be 191 characters or fewer in length and be unique. **This value should not have PII.**
	UniqueName *string `json:"UniqueName,omitempty"`
}

Optional parameters for the method 'CreateService'

func (*CreateServiceParams) SetCallbackUrl

func (params *CreateServiceParams) SetCallbackUrl(CallbackUrl string) *CreateServiceParams

func (*CreateServiceParams) SetChatInstanceSid

func (params *CreateServiceParams) SetChatInstanceSid(ChatInstanceSid string) *CreateServiceParams

func (*CreateServiceParams) SetDefaultTtl

func (params *CreateServiceParams) SetDefaultTtl(DefaultTtl int) *CreateServiceParams

func (*CreateServiceParams) SetGeoMatchLevel

func (params *CreateServiceParams) SetGeoMatchLevel(GeoMatchLevel string) *CreateServiceParams

func (*CreateServiceParams) SetInterceptCallbackUrl

func (params *CreateServiceParams) SetInterceptCallbackUrl(InterceptCallbackUrl string) *CreateServiceParams

func (*CreateServiceParams) SetNumberSelectionBehavior

func (params *CreateServiceParams) SetNumberSelectionBehavior(NumberSelectionBehavior string) *CreateServiceParams

func (*CreateServiceParams) SetOutOfSessionCallbackUrl

func (params *CreateServiceParams) SetOutOfSessionCallbackUrl(OutOfSessionCallbackUrl string) *CreateServiceParams

func (*CreateServiceParams) SetUniqueName

func (params *CreateServiceParams) SetUniqueName(UniqueName string) *CreateServiceParams

type CreateSessionParams

type CreateSessionParams struct {
	// The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date when the Session should expire. If this is value is present, it overrides the `ttl` value.
	DateExpiry *time.Time `json:"DateExpiry,omitempty"`
	// [Experimental] For accounts with the ProxyAllowParticipantConflict account flag, setting to true enables per-request opt-in to allowing Proxy to reject a Session create (with Participants) request that could cause the same Identifier/ProxyIdentifier pair to be active in multiple Sessions. Depending on the context, this could be a 409 error (Twilio error code 80623) or a 400 error (Twilio error code 80604). If not provided, requests will be allowed to succeed and a Debugger notification (80802) will be emitted. Having multiple, active Participants with the same Identifier/ProxyIdentifier pair causes calls and messages from affected Participants to be routed incorrectly. Please note, the default behavior for accounts without the ProxyAllowParticipantConflict flag is to reject the request as described.  This will eventually be the default for all accounts.
	FailOnParticipantConflict *bool `json:"FailOnParticipantConflict,omitempty"`
	// The Mode of the Session. Can be: `message-only`, `voice-only`, or `voice-and-message` and the default value is `voice-and-message`.
	Mode *string `json:"Mode,omitempty"`
	// The Participant objects to include in the new session.
	Participants *[]map[string]interface{} `json:"Participants,omitempty"`
	// The initial status of the Session. Can be: `open`, `in-progress`, `closed`, `failed`, or `unknown`. The default is `open` on create.
	Status *string `json:"Status,omitempty"`
	// The time, in seconds, when the session will expire. The time is measured from the last Session create or the Session's last Interaction.
	Ttl *int `json:"Ttl,omitempty"`
	// An application-defined string that uniquely identifies the resource. This value must be 191 characters or fewer in length and be unique. **This value should not have PII.**
	UniqueName *string `json:"UniqueName,omitempty"`
}

Optional parameters for the method 'CreateSession'

func (*CreateSessionParams) SetDateExpiry

func (params *CreateSessionParams) SetDateExpiry(DateExpiry time.Time) *CreateSessionParams

func (*CreateSessionParams) SetFailOnParticipantConflict

func (params *CreateSessionParams) SetFailOnParticipantConflict(FailOnParticipantConflict bool) *CreateSessionParams

func (*CreateSessionParams) SetMode

func (params *CreateSessionParams) SetMode(Mode string) *CreateSessionParams

func (*CreateSessionParams) SetParticipants

func (params *CreateSessionParams) SetParticipants(Participants []map[string]interface{}) *CreateSessionParams

func (*CreateSessionParams) SetStatus

func (params *CreateSessionParams) SetStatus(Status string) *CreateSessionParams

func (*CreateSessionParams) SetTtl

func (params *CreateSessionParams) SetTtl(Ttl int) *CreateSessionParams

func (*CreateSessionParams) SetUniqueName

func (params *CreateSessionParams) SetUniqueName(UniqueName string) *CreateSessionParams

type CreateShortCodeParams

type CreateShortCodeParams struct {
	// The SID of a Twilio [ShortCode](https://www.twilio.com/docs/sms/api/short-code) resource that represents the short code you would like to assign to your Proxy Service.
	Sid *string `json:"Sid,omitempty"`
}

Optional parameters for the method 'CreateShortCode'

func (*CreateShortCodeParams) SetSid

func (params *CreateShortCodeParams) SetSid(Sid string) *CreateShortCodeParams

type ListInteractionParams

type ListInteractionParams struct {
	// How many resources to return in each list page. The default is 50, and the maximum is 1000.
	PageSize *int `json:"PageSize,omitempty"`
	// Max number of records to return.
	Limit *int `json:"limit,omitempty"`
}

Optional parameters for the method 'ListInteraction'

func (*ListInteractionParams) SetLimit added in v0.13.0

func (params *ListInteractionParams) SetLimit(Limit int) *ListInteractionParams

func (*ListInteractionParams) SetPageSize

func (params *ListInteractionParams) SetPageSize(PageSize int) *ListInteractionParams

type ListInteractionResponse

type ListInteractionResponse struct {
	Interactions []ProxyV1Interaction    `json:"interactions,omitempty"`
	Meta         ListServiceResponseMeta `json:"meta,omitempty"`
}

ListInteractionResponse struct for ListInteractionResponse

type ListMessageInteractionParams

type ListMessageInteractionParams struct {
	// How many resources to return in each list page. The default is 50, and the maximum is 1000.
	PageSize *int `json:"PageSize,omitempty"`
	// Max number of records to return.
	Limit *int `json:"limit,omitempty"`
}

Optional parameters for the method 'ListMessageInteraction'

func (*ListMessageInteractionParams) SetLimit added in v0.13.0

func (*ListMessageInteractionParams) SetPageSize

func (params *ListMessageInteractionParams) SetPageSize(PageSize int) *ListMessageInteractionParams

type ListMessageInteractionResponse

type ListMessageInteractionResponse struct {
	Interactions []ProxyV1MessageInteraction `json:"interactions,omitempty"`
	Meta         ListServiceResponseMeta     `json:"meta,omitempty"`
}

ListMessageInteractionResponse struct for ListMessageInteractionResponse

type ListParticipantParams

type ListParticipantParams struct {
	// How many resources to return in each list page. The default is 50, and the maximum is 1000.
	PageSize *int `json:"PageSize,omitempty"`
	// Max number of records to return.
	Limit *int `json:"limit,omitempty"`
}

Optional parameters for the method 'ListParticipant'

func (*ListParticipantParams) SetLimit added in v0.13.0

func (params *ListParticipantParams) SetLimit(Limit int) *ListParticipantParams

func (*ListParticipantParams) SetPageSize

func (params *ListParticipantParams) SetPageSize(PageSize int) *ListParticipantParams

type ListParticipantResponse

type ListParticipantResponse struct {
	Meta         ListServiceResponseMeta `json:"meta,omitempty"`
	Participants []ProxyV1Participant    `json:"participants,omitempty"`
}

ListParticipantResponse struct for ListParticipantResponse

type ListPhoneNumberParams

type ListPhoneNumberParams struct {
	// How many resources to return in each list page. The default is 50, and the maximum is 1000.
	PageSize *int `json:"PageSize,omitempty"`
	// Max number of records to return.
	Limit *int `json:"limit,omitempty"`
}

Optional parameters for the method 'ListPhoneNumber'

func (*ListPhoneNumberParams) SetLimit added in v0.13.0

func (params *ListPhoneNumberParams) SetLimit(Limit int) *ListPhoneNumberParams

func (*ListPhoneNumberParams) SetPageSize

func (params *ListPhoneNumberParams) SetPageSize(PageSize int) *ListPhoneNumberParams

type ListPhoneNumberResponse

type ListPhoneNumberResponse struct {
	Meta         ListServiceResponseMeta `json:"meta,omitempty"`
	PhoneNumbers []ProxyV1PhoneNumber    `json:"phone_numbers,omitempty"`
}

ListPhoneNumberResponse struct for ListPhoneNumberResponse

type ListServiceParams

type ListServiceParams struct {
	// How many resources to return in each list page. The default is 50, and the maximum is 1000.
	PageSize *int `json:"PageSize,omitempty"`
	// Max number of records to return.
	Limit *int `json:"limit,omitempty"`
}

Optional parameters for the method 'ListService'

func (*ListServiceParams) SetLimit added in v0.13.0

func (params *ListServiceParams) SetLimit(Limit int) *ListServiceParams

func (*ListServiceParams) SetPageSize

func (params *ListServiceParams) SetPageSize(PageSize int) *ListServiceParams

type ListServiceResponse

type ListServiceResponse struct {
	Meta     ListServiceResponseMeta `json:"meta,omitempty"`
	Services []ProxyV1Service        `json:"services,omitempty"`
}

ListServiceResponse struct for ListServiceResponse

type ListServiceResponseMeta

type ListServiceResponseMeta struct {
	FirstPageUrl    string `json:"first_page_url,omitempty"`
	Key             string `json:"key,omitempty"`
	NextPageUrl     string `json:"next_page_url,omitempty"`
	Page            int    `json:"page,omitempty"`
	PageSize        int    `json:"page_size,omitempty"`
	PreviousPageUrl string `json:"previous_page_url,omitempty"`
	Url             string `json:"url,omitempty"`
}

ListServiceResponseMeta struct for ListServiceResponseMeta

type ListSessionParams

type ListSessionParams struct {
	// How many resources to return in each list page. The default is 50, and the maximum is 1000.
	PageSize *int `json:"PageSize,omitempty"`
	// Max number of records to return.
	Limit *int `json:"limit,omitempty"`
}

Optional parameters for the method 'ListSession'

func (*ListSessionParams) SetLimit added in v0.13.0

func (params *ListSessionParams) SetLimit(Limit int) *ListSessionParams

func (*ListSessionParams) SetPageSize

func (params *ListSessionParams) SetPageSize(PageSize int) *ListSessionParams

type ListSessionResponse

type ListSessionResponse struct {
	Meta     ListServiceResponseMeta `json:"meta,omitempty"`
	Sessions []ProxyV1Session        `json:"sessions,omitempty"`
}

ListSessionResponse struct for ListSessionResponse

type ListShortCodeParams

type ListShortCodeParams struct {
	// How many resources to return in each list page. The default is 50, and the maximum is 1000.
	PageSize *int `json:"PageSize,omitempty"`
	// Max number of records to return.
	Limit *int `json:"limit,omitempty"`
}

Optional parameters for the method 'ListShortCode'

func (*ListShortCodeParams) SetLimit added in v0.13.0

func (params *ListShortCodeParams) SetLimit(Limit int) *ListShortCodeParams

func (*ListShortCodeParams) SetPageSize

func (params *ListShortCodeParams) SetPageSize(PageSize int) *ListShortCodeParams

type ListShortCodeResponse

type ListShortCodeResponse struct {
	Meta       ListServiceResponseMeta `json:"meta,omitempty"`
	ShortCodes []ProxyV1ShortCode      `json:"short_codes,omitempty"`
}

ListShortCodeResponse struct for ListShortCodeResponse

type ProxyV1Interaction added in v0.14.0

type ProxyV1Interaction struct {
	// The SID of the Account that created the resource
	AccountSid *string `json:"account_sid,omitempty"`
	// A JSON string that includes the message body of message interactions
	Data *string `json:"data,omitempty"`
	// The ISO 8601 date and time in GMT when the Interaction was created
	DateCreated *time.Time `json:"date_created,omitempty"`
	// The ISO 8601 date and time in GMT when the resource was last updated
	DateUpdated *time.Time `json:"date_updated,omitempty"`
	// The SID of the inbound Participant resource
	InboundParticipantSid *string `json:"inbound_participant_sid,omitempty"`
	// The SID of the inbound resource
	InboundResourceSid *string `json:"inbound_resource_sid,omitempty"`
	// The inbound resource status of the Interaction
	InboundResourceStatus *string `json:"inbound_resource_status,omitempty"`
	// The inbound resource type
	InboundResourceType *string `json:"inbound_resource_type,omitempty"`
	// The URL of the Twilio inbound resource
	InboundResourceUrl *string `json:"inbound_resource_url,omitempty"`
	// The SID of the outbound Participant
	OutboundParticipantSid *string `json:"outbound_participant_sid,omitempty"`
	// The SID of the outbound resource
	OutboundResourceSid *string `json:"outbound_resource_sid,omitempty"`
	// The outbound resource status of the Interaction
	OutboundResourceStatus *string `json:"outbound_resource_status,omitempty"`
	// The outbound resource type
	OutboundResourceType *string `json:"outbound_resource_type,omitempty"`
	// The URL of the Twilio outbound resource
	OutboundResourceUrl *string `json:"outbound_resource_url,omitempty"`
	// The SID of the resource's parent Service
	ServiceSid *string `json:"service_sid,omitempty"`
	// The SID of the resource's parent Session
	SessionSid *string `json:"session_sid,omitempty"`
	// The unique string that identifies the resource
	Sid *string `json:"sid,omitempty"`
	// The Type of the Interaction
	Type *string `json:"type,omitempty"`
	// The absolute URL of the Interaction resource
	Url *string `json:"url,omitempty"`
}

ProxyV1Interaction struct for ProxyV1Interaction

type ProxyV1MessageInteraction added in v0.14.0

type ProxyV1MessageInteraction struct {
	// The SID of the Account that created the resource
	AccountSid *string `json:"account_sid,omitempty"`
	// A JSON string that includes the message body sent to the participant
	Data *string `json:"data,omitempty"`
	// The ISO 8601 date and time in GMT when the resource was created
	DateCreated *time.Time `json:"date_created,omitempty"`
	// The ISO 8601 date and time in GMT when the resource was last updated
	DateUpdated *time.Time `json:"date_updated,omitempty"`
	// Always empty for Message Interactions
	InboundParticipantSid *string `json:"inbound_participant_sid,omitempty"`
	// Always empty for Message Interactions
	InboundResourceSid *string `json:"inbound_resource_sid,omitempty"`
	// Always empty for Message Interactions
	InboundResourceStatus *string `json:"inbound_resource_status,omitempty"`
	// Always empty for Message Interactions
	InboundResourceType *string `json:"inbound_resource_type,omitempty"`
	// Always empty for Message Interactions
	InboundResourceUrl *string `json:"inbound_resource_url,omitempty"`
	// The SID of the outbound Participant resource
	OutboundParticipantSid *string `json:"outbound_participant_sid,omitempty"`
	// The SID of the outbound Message resource
	OutboundResourceSid *string `json:"outbound_resource_sid,omitempty"`
	// The outbound resource status
	OutboundResourceStatus *string `json:"outbound_resource_status,omitempty"`
	// The outbound resource type
	OutboundResourceType *string `json:"outbound_resource_type,omitempty"`
	// The URL of the Twilio message resource
	OutboundResourceUrl *string `json:"outbound_resource_url,omitempty"`
	// The SID of the Participant resource
	ParticipantSid *string `json:"participant_sid,omitempty"`
	// The SID of the resource's parent Service
	ServiceSid *string `json:"service_sid,omitempty"`
	// The SID of the resource's parent Session
	SessionSid *string `json:"session_sid,omitempty"`
	// The unique string that identifies the resource
	Sid *string `json:"sid,omitempty"`
	// The Type of Message Interaction
	Type *string `json:"type,omitempty"`
	// The absolute URL of the MessageInteraction resource
	Url *string `json:"url,omitempty"`
}

ProxyV1MessageInteraction struct for ProxyV1MessageInteraction

type ProxyV1Participant added in v0.14.0

type ProxyV1Participant struct {
	// The SID of the Account that created the resource
	AccountSid *string `json:"account_sid,omitempty"`
	// The ISO 8601 date and time in GMT when the resource was created
	DateCreated *time.Time `json:"date_created,omitempty"`
	// The ISO 8601 date the Participant was removed
	DateDeleted *time.Time `json:"date_deleted,omitempty"`
	// The ISO 8601 date and time in GMT when the resource was last updated
	DateUpdated *time.Time `json:"date_updated,omitempty"`
	// The string that you assigned to describe the participant
	FriendlyName *string `json:"friendly_name,omitempty"`
	// The phone number or channel identifier of the Participant
	Identifier *string `json:"identifier,omitempty"`
	// The URLs to resources related the participant
	Links *map[string]interface{} `json:"links,omitempty"`
	// The phone number or short code of the participant's partner
	ProxyIdentifier *string `json:"proxy_identifier,omitempty"`
	// The SID of the Proxy Identifier assigned to the Participant
	ProxyIdentifierSid *string `json:"proxy_identifier_sid,omitempty"`
	// The SID of the resource's parent Service
	ServiceSid *string `json:"service_sid,omitempty"`
	// The SID of the resource's parent Session
	SessionSid *string `json:"session_sid,omitempty"`
	// The unique string that identifies the resource
	Sid *string `json:"sid,omitempty"`
	// The absolute URL of the Participant resource
	Url *string `json:"url,omitempty"`
}

ProxyV1Participant struct for ProxyV1Participant

type ProxyV1PhoneNumber added in v0.14.0

type ProxyV1PhoneNumber struct {
	// The SID of the Account that created the resource
	AccountSid   *string                                `json:"account_sid,omitempty"`
	Capabilities *ProxyV1ServicePhoneNumberCapabilities `json:"capabilities,omitempty"`
	// The ISO 8601 date and time in GMT when the resource was created
	DateCreated *time.Time `json:"date_created,omitempty"`
	// The ISO 8601 date and time in GMT when the resource was last updated
	DateUpdated *time.Time `json:"date_updated,omitempty"`
	// The string that you assigned to describe the resource
	FriendlyName *string `json:"friendly_name,omitempty"`
	// The number of open session assigned to the number.
	InUse *int `json:"in_use,omitempty"`
	// Reserve the phone number for manual assignment to participants only
	IsReserved *bool `json:"is_reserved,omitempty"`
	// The ISO Country Code
	IsoCountry *string `json:"iso_country,omitempty"`
	// The phone number in E.164 format
	PhoneNumber *string `json:"phone_number,omitempty"`
	// The SID of the PhoneNumber resource's parent Service resource
	ServiceSid *string `json:"service_sid,omitempty"`
	// The unique string that identifies the resource
	Sid *string `json:"sid,omitempty"`
	// The absolute URL of the PhoneNumber resource
	Url *string `json:"url,omitempty"`
}

ProxyV1PhoneNumber struct for ProxyV1PhoneNumber

type ProxyV1Service

type ProxyV1Service struct {
	// The SID of the Account that created the resource
	AccountSid *string `json:"account_sid,omitempty"`
	// The URL we call when the interaction status changes
	CallbackUrl *string `json:"callback_url,omitempty"`
	// The SID of the Chat Service Instance
	ChatInstanceSid *string `json:"chat_instance_sid,omitempty"`
	// The ISO 8601 date and time in GMT when the resource was created
	DateCreated *time.Time `json:"date_created,omitempty"`
	// The ISO 8601 date and time in GMT when the resource was last updated
	DateUpdated *time.Time `json:"date_updated,omitempty"`
	// Default TTL for a Session, in seconds
	DefaultTtl *int `json:"default_ttl,omitempty"`
	// Where a proxy number must be located relative to the participant identifier
	GeoMatchLevel *string `json:"geo_match_level,omitempty"`
	// The URL we call on each interaction
	InterceptCallbackUrl *string `json:"intercept_callback_url,omitempty"`
	// The URLs of resources related to the Service
	Links *map[string]interface{} `json:"links,omitempty"`
	// The preference for Proxy Number selection for the Service instance
	NumberSelectionBehavior *string `json:"number_selection_behavior,omitempty"`
	// The URL we call when an inbound call or SMS action occurs on a closed or non-existent Session
	OutOfSessionCallbackUrl *string `json:"out_of_session_callback_url,omitempty"`
	// The unique string that identifies the resource
	Sid *string `json:"sid,omitempty"`
	// An application-defined string that uniquely identifies the resource
	UniqueName *string `json:"unique_name,omitempty"`
	// The absolute URL of the Service resource
	Url *string `json:"url,omitempty"`
}

ProxyV1Service struct for ProxyV1Service

type ProxyV1ServicePhoneNumberCapabilities

type ProxyV1ServicePhoneNumberCapabilities struct {
	Fax   bool `json:"fax,omitempty"`
	Mms   bool `json:"mms,omitempty"`
	Sms   bool `json:"sms,omitempty"`
	Voice bool `json:"voice,omitempty"`
}

ProxyV1ServicePhoneNumberCapabilities The capabilities of the phone number

type ProxyV1ServiceShortCodeCapabilities

type ProxyV1ServiceShortCodeCapabilities struct {
	Fax   bool `json:"fax,omitempty"`
	Mms   bool `json:"mms,omitempty"`
	Sms   bool `json:"sms,omitempty"`
	Voice bool `json:"voice,omitempty"`
}

ProxyV1ServiceShortCodeCapabilities The capabilities of the short code

type ProxyV1Session added in v0.14.0

type ProxyV1Session struct {
	// The SID of the Account that created the resource
	AccountSid *string `json:"account_sid,omitempty"`
	// The reason the Session ended
	ClosedReason *string `json:"closed_reason,omitempty"`
	// The ISO 8601 date and time in GMT when the resource was created
	DateCreated *time.Time `json:"date_created,omitempty"`
	// The ISO 8601 date when the Session ended
	DateEnded *time.Time `json:"date_ended,omitempty"`
	// The ISO 8601 date when the Session should expire
	DateExpiry *time.Time `json:"date_expiry,omitempty"`
	// The ISO 8601 date when the Session last had an interaction
	DateLastInteraction *time.Time `json:"date_last_interaction,omitempty"`
	// The ISO 8601 date when the Session started
	DateStarted *time.Time `json:"date_started,omitempty"`
	// The ISO 8601 date and time in GMT when the resource was last updated
	DateUpdated *time.Time `json:"date_updated,omitempty"`
	// The URLs of resources related to the Session
	Links *map[string]interface{} `json:"links,omitempty"`
	// The Mode of the Session
	Mode *string `json:"mode,omitempty"`
	// The SID of the resource's parent Service
	ServiceSid *string `json:"service_sid,omitempty"`
	// The unique string that identifies the resource
	Sid *string `json:"sid,omitempty"`
	// The status of the Session
	Status *string `json:"status,omitempty"`
	// When the session will expire
	Ttl *int `json:"ttl,omitempty"`
	// An application-defined string that uniquely identifies the resource
	UniqueName *string `json:"unique_name,omitempty"`
	// The absolute URL of the Session resource
	Url *string `json:"url,omitempty"`
}

ProxyV1Session struct for ProxyV1Session

type ProxyV1ShortCode added in v0.14.0

type ProxyV1ShortCode struct {
	// The SID of the Account that created the resource
	AccountSid   *string                              `json:"account_sid,omitempty"`
	Capabilities *ProxyV1ServiceShortCodeCapabilities `json:"capabilities,omitempty"`
	// The ISO 8601 date and time in GMT when the resource was created
	DateCreated *time.Time `json:"date_created,omitempty"`
	// The ISO 8601 date and time in GMT when the resource was last updated
	DateUpdated *time.Time `json:"date_updated,omitempty"`
	// Whether the short code should be reserved for manual assignment to participants only
	IsReserved *bool `json:"is_reserved,omitempty"`
	// The ISO Country Code
	IsoCountry *string `json:"iso_country,omitempty"`
	// The SID of the resource's parent Service
	ServiceSid *string `json:"service_sid,omitempty"`
	// The short code's number
	ShortCode *string `json:"short_code,omitempty"`
	// The unique string that identifies the resource
	Sid *string `json:"sid,omitempty"`
	// The absolute URL of the ShortCode resource
	Url *string `json:"url,omitempty"`
}

ProxyV1ShortCode struct for ProxyV1ShortCode

type UpdatePhoneNumberParams

type UpdatePhoneNumberParams struct {
	// Whether the phone number should be reserved and not be assigned to a participant using proxy pool logic. See [Reserved Phone Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more information.
	IsReserved *bool `json:"IsReserved,omitempty"`
}

Optional parameters for the method 'UpdatePhoneNumber'

func (*UpdatePhoneNumberParams) SetIsReserved

func (params *UpdatePhoneNumberParams) SetIsReserved(IsReserved bool) *UpdatePhoneNumberParams

type UpdateServiceParams

type UpdateServiceParams struct {
	// The URL we should call when the interaction status changes.
	CallbackUrl *string `json:"CallbackUrl,omitempty"`
	// The SID of the Chat Service Instance managed by Proxy Service. The Chat Service enables Proxy to forward SMS and channel messages to this chat instance. This is a one-to-one relationship.
	ChatInstanceSid *string `json:"ChatInstanceSid,omitempty"`
	// The default `ttl` value to set for Sessions created in the Service. The TTL (time to live) is measured in seconds after the Session's last create or last Interaction. The default value of `0` indicates an unlimited Session length. You can override a Session's default TTL value by setting its `ttl` value.
	DefaultTtl *int `json:"DefaultTtl,omitempty"`
	// Where a proxy number must be located relative to the participant identifier. Can be: `country`, `area-code`, or `extended-area-code`. The default value is `country` and more specific areas than `country` are only available in North America.
	GeoMatchLevel *string `json:"GeoMatchLevel,omitempty"`
	// The URL we call on each interaction. If we receive a 403 status, we block the interaction; otherwise the interaction continues.
	InterceptCallbackUrl *string `json:"InterceptCallbackUrl,omitempty"`
	// The preference for Proxy Number selection in the Service instance. Can be: `prefer-sticky` or `avoid-sticky` and the default is `prefer-sticky`. `prefer-sticky` means that we will try and select the same Proxy Number for a given participant if they have previous [Sessions](https://www.twilio.com/docs/proxy/api/session), but we will not fail if that Proxy Number cannot be used.  `avoid-sticky` means that we will try to use different Proxy Numbers as long as that is possible within a given pool rather than try and use a previously assigned number.
	NumberSelectionBehavior *string `json:"NumberSelectionBehavior,omitempty"`
	// The URL we should call when an inbound call or SMS action occurs on a closed or non-existent Session. If your server (or a Twilio [function](https://www.twilio.com/functions)) responds with valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This means it is possible, for example, to play a message for a call, send an automated text message response, or redirect a call to another Phone Number. See [Out-of-Session Callback Response Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide) for more information.
	OutOfSessionCallbackUrl *string `json:"OutOfSessionCallbackUrl,omitempty"`
	// An application-defined string that uniquely identifies the resource. This value must be 191 characters or fewer in length and be unique. **This value should not have PII.**
	UniqueName *string `json:"UniqueName,omitempty"`
}

Optional parameters for the method 'UpdateService'

func (*UpdateServiceParams) SetCallbackUrl

func (params *UpdateServiceParams) SetCallbackUrl(CallbackUrl string) *UpdateServiceParams

func (*UpdateServiceParams) SetChatInstanceSid

func (params *UpdateServiceParams) SetChatInstanceSid(ChatInstanceSid string) *UpdateServiceParams

func (*UpdateServiceParams) SetDefaultTtl

func (params *UpdateServiceParams) SetDefaultTtl(DefaultTtl int) *UpdateServiceParams

func (*UpdateServiceParams) SetGeoMatchLevel

func (params *UpdateServiceParams) SetGeoMatchLevel(GeoMatchLevel string) *UpdateServiceParams

func (*UpdateServiceParams) SetInterceptCallbackUrl

func (params *UpdateServiceParams) SetInterceptCallbackUrl(InterceptCallbackUrl string) *UpdateServiceParams

func (*UpdateServiceParams) SetNumberSelectionBehavior

func (params *UpdateServiceParams) SetNumberSelectionBehavior(NumberSelectionBehavior string) *UpdateServiceParams

func (*UpdateServiceParams) SetOutOfSessionCallbackUrl

func (params *UpdateServiceParams) SetOutOfSessionCallbackUrl(OutOfSessionCallbackUrl string) *UpdateServiceParams

func (*UpdateServiceParams) SetUniqueName

func (params *UpdateServiceParams) SetUniqueName(UniqueName string) *UpdateServiceParams

type UpdateSessionParams

type UpdateSessionParams struct {
	// The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date when the Session should expire. If this is value is present, it overrides the `ttl` value.
	DateExpiry *time.Time `json:"DateExpiry,omitempty"`
	// [Experimental] For accounts with the ProxyAllowParticipantConflict account flag, setting to true enables per-request opt-in to allowing Proxy to return a 400 error (Twilio error code 80604) when a request to set a Session to in-progress would cause Participants with the same Identifier/ProxyIdentifier pair to be active in multiple Sessions. If not provided, requests will be allowed to succeed, and a Debugger notification (80801) will be emitted. Having multiple, active Participants with the same Identifier/ProxyIdentifier pair causes calls and messages from affected Participants to be routed incorrectly. Please note, the default behavior for accounts without the ProxyAllowParticipantConflict flag is to reject the request as described.  This will eventually be the default for all accounts.
	FailOnParticipantConflict *bool `json:"FailOnParticipantConflict,omitempty"`
	// The new status of the resource. Can be: `in-progress` to re-open a session or `closed` to close a session.
	Status *string `json:"Status,omitempty"`
	// The time, in seconds, when the session will expire. The time is measured from the last Session create or the Session's last Interaction.
	Ttl *int `json:"Ttl,omitempty"`
}

Optional parameters for the method 'UpdateSession'

func (*UpdateSessionParams) SetDateExpiry

func (params *UpdateSessionParams) SetDateExpiry(DateExpiry time.Time) *UpdateSessionParams

func (*UpdateSessionParams) SetFailOnParticipantConflict

func (params *UpdateSessionParams) SetFailOnParticipantConflict(FailOnParticipantConflict bool) *UpdateSessionParams

func (*UpdateSessionParams) SetStatus

func (params *UpdateSessionParams) SetStatus(Status string) *UpdateSessionParams

func (*UpdateSessionParams) SetTtl

func (params *UpdateSessionParams) SetTtl(Ttl int) *UpdateSessionParams

type UpdateShortCodeParams

type UpdateShortCodeParams struct {
	// Whether the short code should be reserved and not be assigned to a participant using proxy pool logic. See [Reserved Phone Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more information.
	IsReserved *bool `json:"IsReserved,omitempty"`
}

Optional parameters for the method 'UpdateShortCode'

func (*UpdateShortCodeParams) SetIsReserved

func (params *UpdateShortCodeParams) SetIsReserved(IsReserved bool) *UpdateShortCodeParams

Jump to

Keyboard shortcuts

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